This file contains hidden or 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
#include "SPI.h" | |
#include "Ethernet.h" | |
#include "WebServer.h" | |
#include "aJSON.h" | |
// prepare for the ethernet profile | |
static uint8_t mac[] = { 0x00 , 0x08, 0xDC, 0x00, 0x00, 0x09 } ; | |
static uint8_t ip[] = { 169, 254, 62, 169 } ; | |
void setup() { |
This file contains hidden or 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
#include <Wire.h> | |
void setup() { | |
Serial.begin( 9600 ) ; | |
while ( !Serial ) ; | |
// run as I2C Slave with id = 1 | |
int slaveId = 1 ; | |
Wire.begin( slaveId ) ; | |
// setup callback function | |
Wire.onReceive( onWireReceive ) ; |
This file contains hidden or 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
#include <Wire.h> | |
// preparing for which slave device | |
// need to be connected | |
int slaveId = 0 ; | |
void setup() { | |
Serial.begin( 9600 ) ; | |
while ( !Serial ) ; | |
// Run as I2C Master |
NewerOlder