COMMAND | ACTION | NOTES |
---|---|---|
git init | initialize a local repo | |
git status | shows current repo status | |
git status -s | shows current repo status: abbreviated version | |
git remote add remoteName remoteURL | adds a remote with given name & destination URL | |
git remote | lists all remotes | |
git remote -v | lists all remotes & destination URLs |
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 test(int val1, int val2=2); | |
void setup() { | |
Serial.begin(9600); | |
test(10,11); | |
test(12); | |
} | |
void loop() {} |
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
// Must be run on Arduino.org IDE (> V1.7.11) | |
#include <Wire.h> | |
#include <ArduinoWiFi.h> | |
void setup() { | |
Wifi.begin(); | |
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
// Code Author: Mikal Hart | |
// Code Source: http://arduiniana.org/libraries/pstring/ | |
// Direct use (no constructor): | |
char buffer[30]; | |
float pi 3.14159; | |
PString(buffer, sizeof(buffer), pi); | |
// Construct an object: | |
char buffer[50]; |
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
// Code Author: Mikal Hart | |
// Code Source: http://arduiniana.org/libraries/streaming/ | |
Serial << "Counter: " << counter; | |
lcd << "Temp: " << t.get_temperature() << " degrees"; | |
my_pstring << "Hello World!" << endl; | |
Serial << "Byte value: " << _HEX(b) << endl; |
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
// http://playground.arduino.cc/Main/I2cScanner | |
// ------------- | |
// i2c_scanner | |
// ------------- | |
#include <Wire.h> | |
void setup() { | |
Wire.begin(); |
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
double mapf(double val, double in_min, double in_max, double out_min, double out_max) { | |
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
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
byte _config = 0x00; // byte to be updated | |
typedef enum:byte { | |
MODE_MASK = 0x0C, // 12 - B00001100 (set all bits to be changed - and only them - to 1) | |
MODE_1 = 0x00, // 0 - B00000000 (Defualt) | |
MODE_2 = 0x08 // 8 - B00001000 | |
} dev_mode_t; | |
void setDevMode(dev_mode_t newMode) { // PARAMS: MODE_1 / MODE_2 | |
setConfig((_config & ~MODE_MASK) | (newMode & MODE_MASK)); |
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
// preprocessor bug fix (place at the very top of the arduino code) | |
#if 1 | |
__asm volatile ("nop"); | |
#endif |
- I2C Communications Library
This library uses the 'WSWire' library for I2C communication between the contoller IC (Master) and the ADS1110 (Slave), so it is NECESSARY to have it installed prior to using the current libraty.
Alternatively, if you wish to use the 'Wire' - or any other I2C library for that matter - simply change the following line the the ADS1110.h file:
#include <WSWire.h>
to this:
OlderNewer