0% found this document useful (0 votes)
32 views3 pages

Arduino

The document provides instructions for setting up and programming an Arduino board to control LED lights. It explains how to install the Arduino software and drivers, connect an LED to the Arduino by linking the long pin to a 3V3 output and short pin to GND, and use simple code to turn the LED on and off with delays. The document also describes how to connect multiple LEDs independently and modify the code to control them separately.

Uploaded by

Livs
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
32 views3 pages

Arduino

The document provides instructions for setting up and programming an Arduino board to control LED lights. It explains how to install the Arduino software and drivers, connect an LED to the Arduino by linking the long pin to a 3V3 output and short pin to GND, and use simple code to turn the LED on and off with delays. The document also describes how to connect multiple LEDs independently and modify the code to control them separately.

Uploaded by

Livs
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

Arduino Setup and Programming

If you are using your Arduino with Windows all that you need to do is plug it into your computer
and it should automatically install the drivers. Next, download the Arduino software from Here:
http://arduino.cc/en/main/software

Using the Arduino and the LEDs included in the kit we can create different lighting regimes to
attempt to control the amount of Red Fluorescent Protein produced and the amount of red color
that we see from pDusk and pDawn.

An LED is pretty simple. It is a semiconductor that when we run current through it will create
light!

Open up the arduino software and connect your arduino to a USB port on your computer. You
should see lights begin to flash on your arduino. If not there is a problem!

The simplest way to make an LED light up is to connect a wire from the point on the arduino that
says 3V3(3.3 Volt output) to the long pin of the LED and one of the points on the arduino that
says GND(Ground) to the short pin on the arduino. You can do this easily using a solderless
breadboard. The way that the solderless breadboard works is that each row is connected to
each other except for the outside columns. So plug a wire in the same row as the long LED pin
to the 3V3 and the connect the short pin using a wire to the GND point on the arduino. You can
bend the LED pins to point the LED at a plate. The blue light should activate transcription of
RFP.
Ok now what if we want to do something more complicated such as test out different
frequencies of light pulses or different amounts of light, we can do both of these using the
arduino.

Open up the arduino program. Delete all the code that you see in the window and copy and
paste this code:

// Set the LED pin


int LED = 3;

void setup() {
// initialize the digital pin as an output.
pinMode(LED, OUTPUT);
}

// the loop routine runs over and over again forever:


void loop() {
digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Now goto the tools option and then Serial Port and select the port if it is not selected. If there is
more than one port chose the one with the highest number at the end. You should see a
checkmark symbol and a right hand arrow symbol. Click on the right hand arrow symbol, this will
compile and upload your code to the arduino. If it doesn’t work try switching to the other serial
port. If there is not more than one serial port unplug your arduino and plug it back in and retry. If
it still doesn’t work try restarting your computer. Then if there is nothing.

The program should turn the LED on for one second and then off for one second. Buuuuut we
need to take the wire that is plugged into 3V3 and instead plug it into the point that has #3.
Frequency of light should change how transcription of the RFP works. Try longer or shorter
delays to see if you can find an optimum for RFP expression. These numbers will be different
depending on the temperature and environment the plate or culture is in.

You can even do this for multiple LEDs. Instead of connecting one connect more! All of them
can be connected to the same GND(Ground) but need to be connected to different outputs. So
connect each LEDs long pin to a different input above #3(don’t connect them to the A0-A5 pins).
Now you can change the code to add in more LEDs:

// Set the LED pin


int LED1 = 3;
int LED2 = 4;

void setup() {
// initialize the digital pin as an output.
pinMode(LED1, OUTPUT);
pinmode(LED2, OUTPUT);
}

// the loop routine runs over and over again forever:


void loop() {
digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(LED2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW
digitalWrite(LED2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

If you want to make them flash at different times move the line with “digitalWrite(LED1, LOW);”
before turning on LED2. You might want to also add in a delay or the LED with just blink off
really fast.

To Add more LEDs do the same thing. Using these techniques you can test the effects of light
on multiple cultures at the same time.

You might also like