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
/* | |
A (neat) cheat way of getting the HC-SR04 distance sensor working on an Arduino Uno | |
put it in the end, with the GND aligned with the GND pin next to pin 13 and AREF | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: |
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
#now fixed to use the latest twitter API as of Feb 2014. | |
#runs fine on SL4A r6 with Python 2.6.2 and Tweepy 2 for python 2.6 | |
import android | |
import tweepy | |
import time | |
droid=android.Android() | |
#droid.wakeLockAcquirePartial() |
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
#witty things for your android phone to say whilst it's pretending to be a photo booth. | |
#run as a background script to avoid any thread clashes/multitasking issues with the main photo taking script | |
#written for python in SL4A | |
import android, time, random | |
runcontinuous = True | |
droid=android.Android() | |
dialogues = {0 : "Hello, I'm the robot photo booth! Please show me your QR codes and I will take your picture and tweet it back to you. Please put your QR code in front of the camera now", | |
1: "I can't see your QR code properly, is it upside down?", |
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
import cc.arduino.*; | |
import processing.serial.*; | |
Arduino arduino; | |
int servo1Pin = 9; // Control pin for servo motor | |
int servo2Pin = 10; // Control pin for servo motor | |
int servo3Pin = 11; // Control pin for servo motor | |
int penposn; | |
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
/** | |
* Convert a JPG image to gcode for Mr Beam | |
* To use, put the .jpg you want to use in the /data folder of your sketch and adjust the canvas size(x,y) to suit the image, | |
* Use the feedrate, laserfloor and lasermax variables to determine how fast and how hard it burns. | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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 <Wire.h> | |
//wire library | |
/* | |
Sourced from | |
http://www.instructables.com/id/Thermostat-Microcontroller-with-an-Arduino-and-a-T/step4/TC74-Arduino-code/ | |
and modified a bit! | |
*/ | |
//works better when you connect SDA and SCLK |
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
//insert gpl code headers here | |
//macro cycle: | |
//setup: intitalise, read all devices and send, wait for gps acquisition | |
//loop: null | |
//interrupt: | |
//1)read in ADC's (direct port sampling) | |
//2)read out GPS timestamp (TIMEMARK) and position (UART or SPI) | |
//3)read out extra data (temp, pressure, humidity) (I2C) | |
//3.1)maybe read some more out of the adc's (3 samples?) direct port sampling, cycle clock | |
//4)apply high level trigger (threshold?) test. |
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
/* | |
DigitalReadSerial | |
Reads a digital input on pin 2, prints the result to the serial monitor | |
This example code is in the public domain. | |
*/ | |
// digital pin 2 has a pushbutton attached to it. Give it a name: | |
//int pushButton = 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
// HTU21D-F is on Arduino Due I2C Bus 2, followed the guidance on forum.arduino.cc/index.php?topic=216359.0 to make it work | |
//modifications to HTU21DF.h and .cpp not included in this file. Also commented out delay.h as it's AVR not ARM. | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_L3GD20_U.h> | |
#include <Adafruit_BMP085_U.h> | |
#include <Adafruit_LSM303_U.h> | |
#include <Adafruit_10DOF.h> |
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_GPS.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_L3GD20_U.h> | |
#include <Adafruit_BMP085_U.h> | |
#include <Adafruit_LSM303_U.h> | |
#include <Adafruit_10DOF.h> | |
#include <Adafruit_HTU21DF.h> | |
#include <Wire.h> | |
#define mySerial Serial1 |
OlderNewer