-
Notifications
You must be signed in to change notification settings - Fork 0
Discover Arduino
antoinezaz edited this page Apr 27, 2016
·
4 revisions
Material needed:
- Arduino card (UNO model)
- Jumpers
- Breadboard
- LEDs
- Resistors
Proc timer (Bigben):
Display the time from the processor to work by using micros()
method:
void loop() {
unsigned long timeEnd = micros();
...
}
Cross lights (FireInTheHole):
Make two traffic lights with six LEDs (red, orange and green) on the breadboard:
([See the mp4 video](https://github.com/antoinezaz/arduiland/blob/master/medias/VID_20160426_124019.mp4))Brightness fade (FadeLED):
Turn on/off a LED on breadboard in fade in/out transition.
Use analogWrite(led, brightness);
where brightness
is decremented.
Serial port & Tick (Mowgly):
To read the card's serial port from PC, use the following command in Python:
$ sudo python
>>> from serial import Serial
>>> serial_port = Serial(port='/dev/{ttyPortUSB}', baudrate=9600)
>>> serial_port.readline()
Output:
>>> serial_port.readline()
12
>>> serail_port.readline()
14