Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

David Cotterill-Drew Robotonics

🏠
Working from home
Block or report user

Report or block Robotonics

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Robotonics
Robotonics / BTtest.ino
Last active Feb 19, 2016
Bluetooth serial test for Arduino Bluetooth shield from Maplin
View BTtest.ino
#include <SoftwareSerial.h>
#define RxD 7
#define TxD 6
SoftwareSerial BlueToothSerial(RxD,TxD);
char flag=1;
void Test_BlueTooth()
{
unsigned char t=0;
View opencv_show_webcam_detect_face.py
#!/usr/bin/env python2
"""
OpenCV example. Show webcam image and detect face.
"""
import cv2
TRAINSET = "/usr/share/OpenCV/lbpcascades/lbpcascade_frontalface.xml"
DOWNSCALE = 4
@Robotonics
Robotonics / Arduino Xinda IR remote
Created Jul 17, 2014
Arduino IRremote library usage with cheap 20 button IR remote from Xinda
View Arduino Xinda IR remote
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
@Robotonics
Robotonics / GUI_2
Created Jul 12, 2014
Arduino sketch to display temp+humidty data from DHT11 sensor on ST7735 TFT LCD
View GUI_2
#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
View CMPS03 example for Arduino
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
View sample code to test sensor
#include?"Wire.h"
#define?tcn75address?0x4F?// with pins 5~7 set to GND, the device address is 0x48
void setup()
{
??Wire.begin(); // wake up I2C bus
??Serial.begin(115200);
}
float tcn75_getTemperature(int address)
@Robotonics
Robotonics / MegaBot.cpp
Created Jan 4, 2014
Megabot C++ file for MegaBot library
View MegaBot.cpp
// Megabot control library
// David Cotterill-Drew @2013 RoboTonics
#include <Arduino.h>
#include <MegaBot.h>
MegaBot::MegaBot(int R0, int R1, int L0, int L1, int EN0, int EN1)
{
int _R0=R0;
@Robotonics
Robotonics / MegaBot.h
Created Jan 4, 2014
Header for MegaBot library
View MegaBot.h
// Arduino library to control Megabot Drive
// David Cotterill-Drew @2013 RoboTonics
#ifndef MegaBot_h
#define MegaBot_h
#include <Arduino.h>
class MegaBot
{
@Robotonics
Robotonics / JoystickView
Created Dec 30, 2013
Virtual Joystick- Android/Arduino via adb
View JoystickView
package org.microbridge.servocontrol;
import java.io.IOException;
import org.microbridge.server.AbstractServerListener;
import org.microbridge.server.Server;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
View color_a.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<!-- Totally "960 Colors"
Author : VenomVendor
Refer : http://stackoverflow.com/q/3769762/1008278
Reference : http://www.computerhope.com/htmcolor.htm , http://www.color-hex.com/color-names.html
-->
<!-- Colors arranged from A -Z -->
<color name="air_force_blue">#5D8AA8</color>
You can’t perform that action at this time.