-
-
Save anonymous/0b62be94302c26b4c6fb to your computer and use it in GitHub Desktop.
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
#include "Arduino.h" | |
#include <SPI.h> | |
#include <Wire.h> | |
#include <EEPROM.h> | |
#include <avr/wdt.h> | |
void dataReceive(int numBytes) | |
{ | |
Serial.print("Receive"); | |
} | |
void dataRequest() { | |
Serial.println("Request"); | |
} | |
void setup() | |
{ | |
// Setup TWI protocol | |
Wire.begin(4); | |
Wire.onRequest(dataRequest); | |
Wire.onReceive(dataReceive); | |
} | |
void loop() | |
{ | |
// Do stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment