-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
66 lines (47 loc) · 2.07 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Hi, i hope you find this stuff useful. It has been designed as a novice DIY
reflow soldering micro controller execise.
I have included parts of the LUFA library because i needed to modify it
slightly in order to get this project compiled, particularly adding a "-lm"
into lufa_build.mk to include the math lib.
For the beginner, it is much easier to have a project to compile right away
without the need to worry about broken dependencies.
Another thing i had to fix was the cross-avr header that describes the
atmega32u2 because it was incomplete in my distro. I include my version here
for reference. In my distro it goes to /opt/cross/avr/avr/include/avr/iom32u2.h
PREREQUISITES:
==============
1) You will a need cross-avr-gcc toolchain and libc. I used a build from Suse:
https://build.opensuse.org/project/show?project=CrossToolchain%3Aavr
to my knowledge, minimum gcc version supporting the 32u2 chip is
avr-gcc-462 (4.6.2). Any more recent version should suit as well.
2) dfu-programmer
http://dfu-programmer.sourceforge.net/
BUILD:
======
1) cd USBpwm
2) make && ./flash
! Remember to shortly short the RST and GND lines before flashing, e.g. using
! a metal pencil tip at the right edge of the "ISP" connector.
for the "flash" script to work, you need write permission to the USB port.
Flashing as root user will always work, if in doubt.
RUN:
====
Actually, the last statement within the flash script should have started
your firmware already, provided your USB provides sufficient current for
the circuit. If your USB is limited to the standard 100 mA load, you may
want to pull the "ON" jumper to disconnect the high power LED while
programming.
talking to your moodlight is as easy as this:
screen /dev/ttyACM0
at the time of writing it understands the following commands:
r -> reduce red intensity
R -> increase red intensity
g -> reduce green intensity
G -> increase green intensity
b -> reduce blue intensity
B -> increase blue intensity
h -> reply "# Hello World" (# = incrementing digit)
PLAY:
=====
Have fun and please contribute your improvements!
Peter ([email protected])