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
// LED pin definitions | |
#define LED_RED 11 | |
#define LED_GREEN 9 | |
#define LED_BLUE 7 | |
#define LED_YELLOW 5 | |
#define LED_CORRECT 4 | |
#define LED_WRONG 2 | |
// Button pin definitions | |
#define BUTTON_RED 12 |
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
window.onmessage = function(e){ | |
parent.postMessage(e); | |
}; |
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
// Forward all postMessage calls from the iframes that have data in the form {method:, arguments:} directly to Segment. | |
window.onmessage = function(e){ | |
var method = e.data.method; | |
var args = e.data.arguments ? _.values(e.data.arguments) : null; | |
if (analytics[method]) { | |
analytics[method].apply(analytics, args); | |
} | |
}; |
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
//Pin connected to ST_CP of 74HC595 | |
int latchPin = 0; | |
//Pin connected to SH_CP of 74HC595 | |
int clockPin = 3; | |
//Pin connected to DS of 74HC595 | |
int dataPin = 2; | |
// Number of digits attached |
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
delay(3000) |
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
Serial.println("GET /a_random_subdirectory_or_file/index.php HTTP/1.1\r\nHost: www.yourserver.com\r\n\r\n"); |
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
sendATcommand("AT+CHTTPACT=\"yourserver.com\",80", "+CHTTPACT: REQUEST", 60000); |
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
sendATcommand("AT+CGPSINFO","+CGPSINFO:",1000); |
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
answer = sendATcommand("AT+CGPS=1,2","OK",1000); |
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
sendATcommand("AT+CPIN=1234", "OK", 2000); |
NewerOlder