Skip to content

Instantly share code, notes, and snippets.

Bob Burns BobBurns

Block or report user

Report or block BobBurns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View systick_tst.s
@ program: systick_tst.s
@ programmer: reb
@ device: stm32L152c discovery eval board
@ description: blink led with systick count down
@ uses systick interrupt routine
@
@ how to compile and flash:
@ arm-none-eabi-as -mcpu=cortex-m3 systick_tst.s -o systick_tst.o
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o systick_tst.elf systick_tst.o
@ arm-none-eabi-objcopy -O binary systick_tst.elf systick_tst.bin
@BobBurns
BobBurns / cylon_eyes.s
Created Aug 14, 2015
cylon eyes program in arm assembly for stm32L discovery
View cylon_eyes.s
@ cylon eyes for stm32L discovery
@ uses lcd software driver 1/4 duty 1/3 bias
@ how to compile and flash:
@ arm-none-eabi-as -mcpu=cortex-m3 cylon_eyes.s -o cylon_eyes.o
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o cylon_eyes.elf cylon_eyes.o
@ arm-none-eabi-objcopy -O binary cylon_eyes.elf cylon_eyes.bin
@ then from st-link (https://github.com/texane/stlink)
@ ./st-flash write ../first_arm/cylon_eyes.bin 0x08000000
.thumb
@BobBurns
BobBurns / stm32.ld
Created Jul 31, 2015
linker script to go with blinky.s
View stm32.ld
/* linker script for STM32 Cortex M3 c/o pygmy.utoh.org */
SECTIONS
{
/* interupt vectors start at zero */
. = 0x0; /* start of flash */
.text : { *(text) }
/* constant data follows code but still in flash */
@BobBurns
BobBurns / blinky.s
Created Jul 31, 2015
blink led on stm32 L1 Discovery with ARM assembly
View blinky.s
@ lets try to blink an LED on the discovery stm32 L1 board
@ uses LED on PB7
@ how to compile and flash:
@ arm-none-eabi-as -mcpu=cortex-m3 blinky.s -o blinky.o
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o blinky.elf blinky.o
@ arm-none-eabi-objcopy -O binary blinky.elf blinky.bin
@ then from st-link (https://github.com/texane/stlink)
@ ./st-flash write ../first_arm/blinky.bin 0x08000000
.thumb
@BobBurns
BobBurns / nfc_server.ino
Created Jul 22, 2015
nfc server for particle web ide
View nfc_server.ino
// firmware to receive bytes from atmega186 over USART and send over Wifi
// The atmega168 is programmed to talk to the pn532 nfc card reader and then send the card info
// over USART.
#define debug 0
#define MAXLEN 256
TCPServer server = TCPServer(2342);
TCPClient client;
bool unlocked = false;
@BobBurns
BobBurns / read_dec.asm
Created Jul 19, 2015
avr code to control pn532 to read and decrement MiFare card value
View read_dec.asm
;this program attempts to read a MiFare card initialized with a name at address 0x04
; and a value block at 0x05
;
;compile with gavrasm read_dec.asm ;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:read_dec.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 **
@BobBurns
BobBurns / write_pn532.asm
Created Jul 19, 2015
avr code to control pn532 and write to MiFare classic.
View write_pn532.asm
;new program to set up and test the PN532 chip reader
;compile with gavrasm write_pn532.asm ;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:write_pn532.asm
;
; 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 **
; ** NSS on pin 2 configured as output **
; ** NSS on pin 2 not selected (high)
@BobBurns
BobBurns / darby.m
Created Jul 19, 2015
mac app to receive nfc data
View darby.m
//
// 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"
@BobBurns
BobBurns / better_backup
Created Apr 5, 2015
bash script to backup directory to usb drive
View better_backup
#
# 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
@BobBurns
BobBurns / client.html
Last active Aug 29, 2015
php websocket device client
View client.html
<!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>
You can’t perform that action at this time.