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
#include <stdio.h> | |
#include <stdlib.h> | |
#define FRAMESIZE 320*240*2 | |
char * framebuffer; | |
void set_screen(FILE * frame); | |
void set_colour(FILE * frame, char colour[]); | |
void draw_pixel(int x, int y, char * colour); | |
char * rgb_to_byte(int red, int green, int blue); |
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 setups | |
int latchPin = 8; | |
int clockPin = 12; | |
int dataPin = 11; | |
int tempPin = 7; | |
char recMsg = '0'; |
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
processor 6502 | |
org $1000 | |
jsr $e544 ;clear the screen | |
lda #72 ;load ascii value for H into A | |
jsr $e716 ;display H from A to screen | |
lda #69 ;load E into A | |
jsr $e716 ;display E |
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
;put Hello World using screen address | |
;rather than jsr $e716 | |
processor 6502 | |
org $1000 | |
jsr $E544 ;clear the screen | |
;set the screen color memory | |
lda #0 ;black in A |
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
game = {} | |
game.button= "" | |
game.key = "" | |
function love.load() | |
success = love.graphics.setMode(320, 240, false, 0) | |
end | |
function love.update(dt) | |
end |
OlderNewer