DIY Li Fi Using Arduino Uno
DIY Li Fi Using Arduino Uno
Table of Contents
Step 4: Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/
Intro: DIY Li-Fi using Arduino Uno
Very simple and useful project to understand the working of Li-Fi, you can also make your own Li-Fi device with a bit more modifications to the design and code provided.
You actually need two arduino's, one to send and the other to receive to make it more fun.
1 K resistor,
LED,
LDR,
Arduino Uno
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/
Step 3: Setting up even light
As the ldr values depend upon the surrounding light and also led cannot emit even light I have used a small paper pipe and placed the led through one end and ldr at the
other end of it.
Step 4: Code
//copy this code and start modifying
int sensorValue = 0; // variable to store the value coming from the sensor
int light=0;
int i=0;
int d[32];
int temp=1;
void setup()
Serial.println(sensorPin);
int b;
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/
while(a!=0)
a=a/2;
if(b==1)
digitalWrite(13,HIGH);
delay(2);
sensorValue=analogRead(sensorPin);
d[i]=sensorValue; }
else
digitalWrite(13,LOW);
delay(2);
sensorValue=analogRead(sensorPin);
d[i]=sensorValue;
i++;
} i--;
while(i>=0)
if(d[i]>=14)
k=i;
while(k!=0)
temp=temp*2;
k--;
add=add+temp;
temp=1;
i--;
digitalWrite(13,LOW); }
void loop()
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/
Step 5: Further applications
You can make few changes to the code and make it work for characters and also you can use a light bulb instead of led which can give more light evenly than the led
which is the actual concept of Li-Fi.
Enjoy.
Related Instructables
Advertisements
Comments
1 comments Add Comment
DIY Hacks and How Tos says: Mar 19, 2016. 2:57 PM REPLY
Cool Li-Fi project.
http://www.instructables.com/id/DIY-Li-Fi-Using-Arduino-Uno/