Install https://pypi.python.org/pypi/libusb1
# Create rule so the device can be controlled by any user
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="f055", ATTR{idProduct}=="05df", MODE="0666"' \
| tee /etc/udev/rules.d/99-status-light.rules
/** | |
* Thrown together program to dump 512 kbit EPROMs from an AVR ATMega64A/128A | |
* More specifically, a bunch of ST M27C512 from the early 90's | |
* | |
* Connections: | |
* | |
* Port A 0-7: low address byte (output) | |
* Port B 0-7: high address byte (output) | |
* Port D 0-7: data (input) | |
* |
#import <Foundation/Foundation.h> | |
#import "RCTBridgeModule.h" | |
@interface TimerModule : NSObject <RCTBridgeModule> | |
@end |
Install https://pypi.python.org/pypi/libusb1
# Create rule so the device can be controlled by any user
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="f055", ATTR{idProduct}=="05df", MODE="0666"' \
| tee /etc/udev/rules.d/99-status-light.rules
DEVICE = atmega328p | |
CLOCK = 16000000 | |
PROGRAMMER = -c arduino -P /dev/ttyUSB0 -b57600 | |
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) | |
SOURCES = $(shell find . -name '*.c') | |
OBJECTS = $(SOURCES:.c=.o) | |
# Automatic dependency resolution |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cards</title> | |
<link href="http://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> |
/** | |
* Recurse through tabs and remove any with no child fields | |
* | |
* The way SilverStripe's field scaffolding works can leave empty tabs around after | |
* fields are moved or removed by the slices module. | |
* | |
* @param FieldList $fields | |
* @return FieldList | |
*/ | |
protected function removeEmptyTabs(FieldList $fields) |
This is a first pass at reading the date and time from a serial GPS device on a tiny microcontroller. The target device is an ATTiny13A with only 64 bytes of RAM, which isn't enough to store the full 79 characters of a NMEA sentence, so something like minmea wouldn't work (their API passes around full sentence strings).
When compiled with avr-gcc -Os
, this is around 500 bytes of program space.
The size can be reduced by 100 bytes if the handling of checksums is removed.
DEVICE = attiny13a | |
CLOCK = 1200000 | |
PROGRAMMER = -c dragon_isp | |
SOURCES = $(shell find . -name '*.c' -or -name '*.cpp' -or -name '*.S') | |
OBJECTS = $(SOURCES:.c=.o) | |
AVRDUDE = avrdude $(PROGRAMMER) -p t13 | |
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) | |
COMPILE += -I -I. -I./lib/ | |
COMPILE += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
This specific part doesn't work out of the box with the OpenCM3 STM32 F0 USB example/testcase for two reasons: