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 <OneWire.h> | |
#include <DallasTemperature.h> | |
// pin connected to sensor | |
int tempPin = 7; | |
// define the onewire obj needed for connecting to onewire components | |
OneWire oneWire(tempPin); | |
// define dallas obj, makes it easier to read temp | |
DallasTemperature tempSens(&oneWire); |
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/python | |
import serial | |
import time | |
# try connecting to serial port | |
try: | |
print 'MSG: Connecting to arduino' | |
arduino = serial.Serial('/dev/tty.usbserial-A600agDn', 9600) | |
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
char msg = '0'; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop(){ | |
// While data is sent over serial assign it to the msg | |
while (Serial.available() > 0){ | |
msg = Serial.read(); |
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
;********************************************************* | |
;* HELLOWORLD using .BYTE, CHROUT and loops * | |
;********************************************************* | |
processor 6502 | |
org $C000 | |
;set up some helpful labels | |
CLEAR = $E544 | |
CHROUT = $FFD2 |
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
;********************************************* | |
;* Arrow Cursor, W,S,A,D * | |
;********************************************* | |
processor 6502 | |
org $1000 | |
;setup helpful labels | |
CLEAR = $E544 | |
CHROUT = $FFD2 |
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
// create the client | |
RestClient client = new RestClient(); | |
client.BaseUrl = url; | |
// create the request | |
RestRequest request = new RestRequest(Method.POST); | |
request.Resource = service_method; | |
request.AddParameter("text/xml", body, ParameterType.RequestBody); | |
// send the request |
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
require "string" | |
--------------------------------------------------------- | |
-- a font library for the dingoo -- | |
-- allows for multiple fonts -- | |
--------------------------------------------------------- | |
-- creates a table of images from a font | |
-- ImageData source, String char_list, Number char_width, Number seperator_width |
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 <SPI.h> | |
#include <GD.h> | |
void setup() { | |
// give time for the gameduino splash screen to be displayed | |
delay(2500); | |
GD.begin(); | |
// load character set |
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
DataContext db = new DataContext(); | |
try { | |
db.table.InsertOnSubmit(obj); | |
db.SubmitChanges(); | |
} | |
catch(Exception) { | |
return false; | |
} | |
return true; |
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 sys | |
from PIL import Image | |
from gameduino import prep | |
image_path = "" | |
h_name = "" | |
# retrieve the command line arguments | |
if (len(sys.argv) > 2): |
OlderNewer