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 <SPI.h> | |
#include <Adb.h> | |
Connection * connection; | |
// Elapsed time for sensor sampling | |
long lastTime; | |
// Event handler for shell connection; called whenever data sent from Android to Microcontroller | |
void adbEventHandler(Connection * connection, adb_eventType event, uint16_t length, uint8_t * data) |
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 <SPI.h> | |
#include <Adb.h> | |
#define LEDcount 3 | |
Connection * connection; | |
long lastTime; | |
//Array of state of LEDs |
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 <SPI.h> | |
#include <Adb.h> | |
#define BUTTON1 2 | |
#define BUTTON2 3 | |
Connection * connection; | |
// Bytes for each button state | |
byte b1, b2; |
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 <SPI.h> | |
#include <Adb.h> | |
Connection * connection; | |
// LED leads connected to PWM pins | |
const int RED_LED_PIN = 3; | |
const int GREEN_LED_PIN = 5; | |
const int BLUE_LED_PIN = 6; |
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 <SPI.h> | |
#include <Adb.h> | |
#include <Servo.h> | |
#define SERVO1 5 | |
Servo servo1; | |
Connection * connection; |
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 <SPI.h> | |
#include <Adb.h> | |
#define BUTTON_LEFT 2 | |
#define BUTTON_UP 3 | |
#define BUTTON_DOWN 4 | |
#define BUTTON_RIGHT 5 | |
Connection * connection; |
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 <SPI.h> | |
#include <Adb.h> | |
#include <Servo.h> | |
#define LED1 3 | |
#define LED2 4 | |
#define SERVO1 5 | |
#define SERVO2 6 | |
Servo servos[2]; |
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 <SPI.h> | |
#include <Adb.h> | |
Connection * connection; | |
// Elapsed time for sensor sampling | |
long lastTime; | |
// Event handler for shell connection; called whenever data sent from Android to Microcontroller | |
void adbEventHandler(Connection * connection, adb_eventType event, uint16_t length, uint8_t * data) |
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 <SPI.h> | |
#include <Adb.h> | |
#include <SoftwareSerial.h> | |
Connection * connection; | |
// Pins for TTL 4 digit serial display | |
#define rxPin 2 | |
#define txPin 3 |
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 <SPI.h> | |
#include <Adb.h> | |
// Adb connection. | |
Connection * connection; | |
// Elapsed time for sensor sampling | |
long lastTime; | |
// Event handler for shell connection; called whenever data sent from Android to Microcontroller |
OlderNewer