Hardware Reference
In-Depth Information
1. Connect the (-) pin of the LED with the GND pin of the shield.
2. Connect the (+) pin of the LED with the 5V pin of the shield.
3. Connect the d pin of the LED with the SDA pin of the shield.
4. Connect the c pin of the LED with the SCL pin of the shield.
Then create and execute a file with the following code, which will alternate the LED's
color from red to blue five times and then make some smooth transitions resulting in
purples:
*
* Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
* http://www.libelium.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Version 0.1
* Author: Anartz Nuin Jiménez
*/
//Include arduPi library
#include "arduPi.h"
void setup(){
Wire.begin();
Wire.beginTransmission(9);
Wire.write('o'); //End the current Light script
Wire.endTransmission();
}
void loop(){
Search WWH ::




Custom Search