Monday, September 19, 2011

Fading 2 LEDS Challenge.Using an Arduino!

This project is for beginners on arduino who want a challenge.(if it is a challenge!?!)
You have to create the fading led effect on 2 leds. But each led has to fade all the way off so then the fading on may start on the other led. Like So-


If you gave up or want the answer here is the source code(there might be other ways to do it, so if you can recreate the effect it is fine. comment below your answer)-

/* This source is for fading 2 leds one at a time
 As soon as one led is off the other will start to turn on
 */


int brightness=0; //sets the brightness of the led. it starts as off or 0
int change = 5; //change for bightness
int ledon = 6; // ledon is the led which is currently on
int ledchange = 1; // switches which led is going to turn on
int prevled =5; // represents the previous led that was on.

void setup()
{
  pinMode(5,OUTPUT); //led is on pin 5
  pinMode(6,OUTPUT); // anothe led on pin 6
}

void loop()
{

  analogWrite(ledon, brightness); // starts to set the led on
  brightness = brightness + change; // creates the fade effect

  if (brightness == 255){ //if brightness reaches 255 then
    change=-change;       // change will become negative and cause led to fade out
    ledchange=-ledchange; //this will switch which led is on
  }

if (brightness == 0){             //if brightness is 0 or nothing then
    ledon =ledchange+ledon;       //led which will turn on is changed
    prevled =ledon - ledchange;   //SETs the led which was previously on so 
    analogWrite(prevled,0);       // it will stay off without this the led will stay on
    change=-change;               // change, changes again to fade the led up.
  }

  delay(30);              //delay for a smooth effect
}





PNP Transistor Simple Project W/ Arduino

In this effect I only program one led to blink, I used a PNP transistor to turn on another LED once the first LED is off. The transistor makes the other led turn on while the other is off, so it would make 2 LED blink
Things needed is 2 LED, 2 Resistors(I used 100ohms), Arduino Board, PNP Transistor and wires.
I will post a video later when I get a camera.



This is my attempt at a schematic. If you don't know what the symbols are click this link

Source(it is just the blink example on the Arduino)-


void setup() {                


  pinMode(13, OUTPUT);    
}
void loop() {
  digitalWrite(13, HIGH);  
  delay(1000);              
  digitalWrite(13, LOW);   
  delay(1000);              
}



Friday, September 9, 2011

Fading Leds With Arduino!



This is just the source code, for now. I will write a tutorial later.

Source Code-


/*This is my attemp to copy http://www.youtube.com/watch?v=xI-sODvkuTM&feature=watch_response_rev
 or an illusion of the leds fading smoothly to the next one.
 */


int thr=0;   // represents brightness for pin,
int fiv=50;  // each integer's name is the firs three letters of the pin
int six=100; // it represents of the pin it represents this is just to keep
int nin=150; // track it represents
int ten=205;
int ele=255;




int c1=5;  //c represents change, each pin gets its own change
int c2=5;  // so it wont interfere with any other pin
int c3=5;
int c4=5;
int c5=5;
int c6=5;


void setup(){
  pinMode(3,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
}
void loop(){
  analogWrite(3,thr);
  thr=thr+c1;
  analogWrite(5,fiv);
  fiv=fiv-c2;
  analogWrite(6,six);
  six=six-c3;
  analogWrite(9,nin);
  nin=nin-c4;
  analogWrite(10,ten);
  ten=ten-c5;
  analogWrite(11,ele);
  ele=ele-c6;
  
  
  if(thr==0 || thr==255){
    c1=-c1;
  }
  if(fiv==0 || fiv==255){
    c2=-c2;
  }
  if(six==0 || six==255){
    c3=-c3;
  }
  if(nin==0 || nin==255){
    c4=-c4;
  }
  if(ten==0 || ten==255){
    c5=-c5;
  }
  if(ele==0 || ele==255){
    c6=-c6;
  }
  delay(10);
}


Wednesday, September 7, 2011

Unlock iPhone 4with Gevey Ultra SIM





Gevey Ultra Sims are nothing new, but i decided to try it to see if it really works. I got mines from http://applenberry.com/store/gevey-sim/gevey-ultra.html. Shipping was super fast and most importly it came.


ApplenBerry is a authorized re-seller BEWARE OF OTHER SITES, they may or may not be real Gevey.


Gevey will work on firmware 4.3.4 and 4.3.5 but you have to do the steps manually or for a non-jailbroken devices.


Instructions
Jailbroken Devices

  1. Open Cydia
  2. Click on Manage then Sources
  3. Click Edit then Add
  4. Type "http://cydia.furiousmod.com "
  5. After it is done click 'Return to Cydia'
  6. Then click on FuriosMod.com
  7. Install FuriousMod 
  8. Confirm It and Respring your iPhone
  9. Turn off your iPhone and put in your Gevey SIM Card
  10. Turn on your iPhone and wait for your carrier name to load.
If you ever remove the SIM card while it is on, you must turn the iPhone off again to have the unlock.
If you are having problems I suggest you try unlocking the iPhone manually which is the Non-Jailbroken Device's way.


Non-Jailbroken Devices

  1. Turn off your iPhone, if it is on.
  2. Insert your SIM card with Gevey SIM card.
  3. A Welcome Menu should show up, accept it. (it did not show up for me so its okay to skip this)
  4. Click on Settings
  5. Click on Phone
  6. Scroll down, click SIM Applications
  7. Click on Instructions
  8. Accept and wait 15 seconds
  9. When you have one bar dial 112 and press end immediately not letting the call go through.
  10. Turn on Airplane Mode and wait 40 seconds
  11. You will see "No SIM card installed", turn off Airplane Mode
  12. "SIM Failure" should appear click OK and wait for your carrier name to appear. 
  13. Enjoy Your tether unlocked iPhone
It is important in step 8 to wait, and step 9 to wait for a signal bar.
It might take you more than one try to get all the steps right .
Official Instructions can be found at http://applenberry.com/store/instructions/gevey-ultra-1/manual.html
I recently updated an iPhone 4 to GM ios 5 which also updates the baseband to 4.11.01, Gevey did not work so stick with 4.3.5 or lower.
If you have shsh you can always downgrade.