Arduino Projects: Difference between revisions

Line 440:
 
= Bluetooth Controlled RGB LED Strip =
Source: [https://www.arduino.cc/en/Tutorial/ReadASCIIString arduino.cc]], [[https://play.google.com/store/apps/details?id=com.embarcadero.AndroidunoBt&hl=en play.google.com]
 
<pre style="width: 75%; height: 10pc; overflow-y: scroll;">/*/ pins for the LEDs:
Reading a serial ASCII-encoded string.
 
This sketch demonstrates the Serial parseInt() function.
It looks for an ASCII string of comma-separated values.
It parses them into ints, and uses those to fade an RGB LED.
 
Circuit: Common-Cathode RGB LED wired like so:
* Red anode: digital pin 3
* Green anode: digital pin 5
* Blue anode: digital pin 6
*/
 
// pins for the LEDs:
const int redPin = 3;
const int greenPin = 5;