This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
// put your setup code here, to run once: | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
// put your setup code here, to run once: | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
void setup() { | |
// initialize the digital pin as an output. | |
// Pin 13 has an LED connected on most Arduino boards: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DigitalReadSerial | |
Reads a digital input on pin 2, prints the result to the serial monitor | |
This example code is in the public domain. | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
pinMode(2, INPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AnalogReadSerial | |
Reads an analog input on pin 0, prints the result to the serial monitor | |
This example code is in the public domain. | |
*/ | |
void setup() { | |
Serial.begin(9600); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Display the value 123: | |
DigitShield.setValue(123); | |
// Display the value 64 with leading zeros: | |
DigitShield.setLeadingZeros(true); | |
DigitShield.setValue(64); | |
// Display the value of pi with 2 decimal places | |
DigitShield.setPrecision(2); | |
DigitShield.setValue(3.14159265); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DigitShield.begin() : initialize the Digit Shield. This is required before use. | |
DigitShield.setValue(int value) : set an integer value to display | |
DigitShield.setValue(double value) : set a floating point value to display | |
DigitShield.setPrecision(int decimalPlaces) : specify the number of decimal places to display | |
DigitShield.setLeadingZeros(boolean b) : specify whether numbers should be displayed with leading zeros (default is false) | |
DigitShield.setBlank(boolean b) : allows you to blank the display completely. Specify false to turn the display back on. | |
DigitShield.setDigit(int d, int n) : set digit d to value n. Digits are numbered 1-4 from left to right. | |
DigitShield.setDecimalPoint(int d, boolean on) : turn the decimal point of digit d on or off. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get in contact with us: | |
[email protected] or [email protected] or [email protected] | |
02 8003 3523 | |
http://www.littlebirdelectronics.com/facebook | |
http://twitter.com/lbhq | |
http://www.littlebirdelectronics.com/googleplus | |
Hackerspaces: | |
http://www.makehackvoid.com/ (Canberra) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import logging | |
DDR_IN = (1 << 5) | |
DDR_OUT = (0 << 5) | |
PULL_R_UP = (1 << 4) | |
PULL_R_DOWN = (0 << 4) | |
PULL_R_EN = (1 << 3) | |
PULL_R_DIS = (0 << 3) | |
uart1_pin_mux = [ |
OlderNewer