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
; | |
;reaction timer program from AVR programming | |
;button on PD2 // leds on PORTB | |
; | |
.equ UBBRvalue = 12 | |
.equ UCSR0C = 0xc2 ;SRAM address of UCSR0C | |
.def temp = r16 | |
.def count = r17 | |
.def temp2 = r18 | |
.def xL = r26 ;x reg used as global counter |
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
;demo program to learn how the avr can talk to another device with SPI | |
;in this case the 25LC256 eeprom | |
; | |
;based on the example code in c from Elliot Williams AVR Programming | |
;this example writes a string to the eeprom and then read it into sram to be sent over USART | |
; | |
;compile with gavrasm SPI-hello_eeprom.asm | |
;flash with avrdude -c avrisp -p m168 -P /dev/tty.useyourmodem -b 19200 -U flash:w:SPI-hello_eeprom.hex | |
; | |
;there are a couple extra convenience routines to use later |
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
;new program to set up and test the nRF8001 blufruit module | |
;compile with gavrasm leaky_broadcast.asm | |
;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:leaky_broadcast.hex | |
; | |
; I/O pins: | |
; ** use PORTB except RDYN on PORTD ** | |
; ** SCK on pin 5 configured as output ** | |
; ** MISO on pin 4 configured as input with pullup ** | |
; ** MOSI on pin 3 configured as output ** | |
; ** REQN on pin 2 configured as output ** |
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
// | |
// AppDelegate.m | |
// leakyFaucetDesktop | |
// | |
// Created by WozniBob on 12/22/14. | |
// Copyright (c) 2014 Bob_Burns. All rights reserved. | |
// | |
#import "AppDelegate.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
;new routines for leaky_faucet | |
;uses adafruit liquid flow meter 828 | |
; | |
;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:newLeak.hex | |
; | |
;*** use int1 for senor interrup PD3 **** | |
; make sure to check registers before importing into ble program | |
.equ UBBRvalue = 12 | |
.def temp = r16 | |
.def count = r17 |
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
;sound sensor program using piezo to detect a dripping faucet | |
;adapted from the footstep detector from AVR-Programming by Elliot Williams | |
; | |
;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:piezoLeak.hex | |
; | |
;use adc2 on PC2 for piezo input | |
; make sure to check registers before importing into ble program | |
.equ UBBRvalue = 12 | |
.def temp = r16 | |
.def count = r17 |
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/php | |
<?php | |
/* websocket/device server program for raspberry pi | |
* this program only deals with packets that are 125 bytes max | |
* currently only one client can connect at a time. Maybe not a bad thing. | |
* run as super user (for gpio access) | |
* check out https://gist.github.com/BobBurns/6f83930912da4094f014 for the client html code | |
* much of the juicy bits adapted from ghedipunk/PHP-Websockets | |
* |
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
<!DOCTYPE html> | |
<!-- put this in your /var/www/ folder --> | |
<!-- see wsds.php for server/client commands --> | |
<html> | |
<head> | |
<title>Web Socket Device</title> | |
</head> | |
<body onunload="sendClose()"> <!-- doesn't work with Safari --> | |
<h1>Web Socket Device Fun<br></h1> | |
<h2><p id="temp"></p></h2> |
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
# | |
# important! cannot use this program to backup itself ->$HOME/bin | |
# script to backup directory to usb drive mounted to bobsUSB | |
# | |
# first make sure file is used as argument | |
if [ ! -d "$1" ] | |
then | |
echo "usage: better_backup mydir" | |
exit 1 |
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
// | |
// AppDelegate.m | |
// nfc_socket_client | |
// | |
// Created by WozniBob on 6/19/15. | |
// Copyright (c) 2015 Bob_Burns. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "Student.h" |