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 / GUI_2
Created July 12, 2014 21:39
Arduino sketch to display temp+humidty data from DHT11 sensor on ST7735 TFT LCD
#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
@Robotonics
Robotonics / BBC_LCD.py
Created March 17, 2017 00:27
BBC Micro:Bit 16x2 Character LCD
from microbit import *
# pin connections
rs = pin0
enable = pin1
datapins = [pin8, pin12, pin2, pin13]
button1 = pin5
# commands
LCD_CLEARDISPLAY = 0x01
LCD_RETURNHOME = 0x02
@Robotonics
Robotonics / MakeBlock_BT3.ino
Last active April 19, 2017 22:21
MakeBlock Bluetooth v3.0
/*************************************************************************
* File Name : MakeBlock_BT3.ino
* Author : David Cotterill-Drew
* Updated : 19/04/2017
* Version : V3.0
* Date : 19/04/2017
* Description : Program to be used with Orion controller/Uno
* License : Open Source
* Copyright (C) 2017 RoboTonics.
* https://r0b0t.wordpress.com/
@Robotonics
Robotonics / MakeBlock_BT2.py
Created April 18, 2017 21:58
MakeBlock python forklift
#--------------------------------------------------
# Python program to interact with and
# control a MakeBlock Robot Forklift.
# Author: David Cotterill-Drew 2017
# Email: roboshopz@gmail.com
#--------------------------------------------------
# Imports
#--------------------------------------------------
from bluepy.btle import *
from Tkinter import *
@Robotonics
Robotonics / MakeBlock_BT2.ino
Last active April 18, 2017 21:56
MakeBlock Bluetooth Arduino robot forklift
/*************************************************************************
* File Name : MakeBlock_BT2.ino
* Author : David Cotterill-Drew
* Updated : 18/04/2017
* Version : V2.0
* Date : 18/04/2017
* Description : Program to be used with Mbot
BT.py to control robot via bluetooth.
* License : Open Source
* Copyright (C) 2016 RoboTonics.
@Robotonics
Robotonics / MakeBlock_ForkLift.ino
Created April 2, 2017 12:47
Program to operate DIY MakeBlock Forklift with Infra red control
#include "MeOrion.h"
#include <SoftwareSerial.h>
MeInfraredReceiver infraredReceiverDecode(PORT_6);
MeDCMotor MotorL(M1);
MeDCMotor MotorR(M2);
MeDCMotor Holder(PORT_1);
MeDCMotor Hand(PORT_2);
int distance=0;
@Robotonics
Robotonics / BBC_MOTOR1.py
Created March 19, 2017 18:34
BBC Micro:Bit Motor Control x 2 Motors
from microbit import *
m1 = pin13
m2 = pin14
m3 = pin15
m4 = pin16
def right():
m1.write_digital(1)
m2.write_digital(0)
@Robotonics
Robotonics / BBC_LCD2.py
Created March 18, 2017 00:38
BBC Micro:Bit LCD 2
from microbit import *
# pin connections
rs = pin0
enable = pin1
datapins = [pin8, pin12, pin2, pin13]
# commands
LCD_CLEARDISPLAY = 0x01
LCD_RETURNHOME = 0x02
#--------------------------------------------------
# Python program to interact with and
# control a MakeBlock Robot.
# Author: David Cotterill-Drew 2016
# Email: roboshopz@gmail.com
#--------------------------------------------------
# Imports
#--------------------------------------------------
from bluepy.btle import *
@Robotonics
Robotonics / makeblock_bluetooth.ino
Created December 6, 2016 18:17
Arduino program to communicate with makeblockbluetooth.py
#include <MeOrion.h>
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include "MatrixGraphics.h"
MeBluetooth bluetooth(PORT_5);
MeDCMotor MotorL(M1);
MeDCMotor MotorR(M2);