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 highByte; | |
byte lowByte; | |
? | |
Wire.beginTransmission(address); //starts communication with cmps03 | |
Wire.write(2); //Sends the register we wish to read | |
Wire.endTransmission(); | |
? | |
Wire.requestFrom(address, 2); //requests high byte | |
while(Wire.available() < 2); //while there is a byte to receive | |
highByte = Wire.read(); //reads the byte as an integer |
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 <Adafruit_GFX.h> // Core graphics library | |
#include <Adafruit_ST7735.h> // Hardware-specific library | |
#include <SPI.h> | |
#include <dht.h> // dht temp humidity sensor library | |
#define cs 10 | |
#define dc 9 | |
#define rst 8 | |
#define DHT11_PIN 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 <IRremote.h> | |
int RECV_PIN = 11; | |
IRrecv irrecv(RECV_PIN); | |
decode_results results; | |
void setup() | |
{ |
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
#!/usr/bin/env python2 | |
""" | |
OpenCV example. Show webcam image and detect face. | |
""" | |
import cv2 | |
TRAINSET = "/usr/share/OpenCV/lbpcascades/lbpcascade_frontalface.xml" | |
DOWNSCALE = 4 |
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 <SoftwareSerial.h> | |
#define RxD 7 | |
#define TxD 6 | |
SoftwareSerial BlueToothSerial(RxD,TxD); | |
char flag=1; | |
void Test_BlueTooth() | |
{ | |
unsigned char t=0; |
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
////////////////////////////////////////////// | |
// CAT AND MOUSE GAME | |
// Author: Mike Parks | |
// | |
////////////////////////////////////////////// | |
// INCLUDE LIBRARIES | |
#include <Esplora.h> | |
// DECLARE GLOBAL VARIABLES |
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
// Project created by David Cotterill-Drew- Just to learn and have fun! | |
// 05/04/2016 23:08 GMT | |
#include "application.h" | |
double fuelval; | |
double fuelper; | |
FuelGauge fuel; | |
void setup() | |
{ |
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
// Project created by David Cotterill-Drew- Just to learn and have fun! | |
// 05/04/2016 23:08 GMT | |
#include "math.h" // needed for 'pow' and 'floor' | |
double fuelval; // Variable to hold voltage measurement | |
double fuelper; // Variable to hold battery charge as a percentage | |
int mic = A0; // Output of mic connected to A0 - ADC pin | |
int level=0; // Variavle to hold sound output measurement |
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
Servo Servo1; | |
Servo Servo2; | |
Servo Servo3; | |
Servo Servo4; | |
void setup() { | |
Servo1.attach(D0); | |
Servo2.attach(D1); | |
Servo3.attach(D2); |
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
<launch> | |
<!-- | |
To distinguish between the cases where the rgb image is | |
1280x1024 versus 640x480. This affects the pipeline. | |
--> | |
<arg name="high_res_rgb" default="true"/> | |
<arg name="cloud_input_ns" value="camera/rgb_downsampled" | |
if="$(arg high_res_rgb)"/> | |
<arg name="cloud_input_ns" value="camera/rgb" unless="$(arg high_res_rgb)"/> |