Skip to content

Instantly share code, notes, and snippets.

View Robotonics's full-sized avatar
🏠
Working from home

David Cotterill-Drew Robotonics

🏠
Working from home
View GitHub Profile
@Robotonics
Robotonics / fuelgague.ino
Created April 5, 2016 23:04
Creates two Particle cloud variables, one ( fuelval ) for battery voltage, and the other ( fuelper ) for battery percentage remaining.
// 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()
{
@Robotonics
Robotonics / BTtest.ino
Last active February 19, 2016 07:26
Bluetooth serial test for Arduino Bluetooth shield from Maplin
#include <SoftwareSerial.h>
#define RxD 7
#define TxD 6
SoftwareSerial BlueToothSerial(RxD,TxD);
char flag=1;
void Test_BlueTooth()
{
unsigned char t=0;
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
@Robotonics
Robotonics / MegaBot.cpp
Created January 4, 2014 19:18
Megabot C++ file for MegaBot library
// 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 January 4, 2014 19:16
Header for MegaBot library
// 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 December 30, 2013 13:38
Virtual Joystick- Android/Arduino via adb
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;
<?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>
#include <Tone.h>
Tone freq1;
Tone freq2;
const int DTMF_freq1[] = { 1336, 1209, 1336, 1477, 1209, 1336, 1477, 1209, 1336, 1477 };
const int DTMF_freq2[] = { 941, 697, 697, 697, 770, 770, 770, 852, 852, 852 };
void setup()
@Robotonics
Robotonics / Vertical-Navigation-Menu.markdown
Created September 6, 2013 16:08
A Pen by Madalin Tudose.