Releases: bigjosh/Move38-Arduino-Platform
Release 1.3.3 for Arduino Boards Manager
Remove the "attrib" read-only flag from Broken Rainbows example in the Windows file system so that it does not later get included inside the zip file as "R" attribute, which causes installation problems on some platforms.
Note that to remove this attribute you can not use the properties dialog, you must manually use the the "attrib -r" command.
Hopefully (finally!) closes #110 and #112. Note that there is no commit for this update because git does not track these attribs!
Release 1.3.1 for Arduino boards manager.
Remove readonly
flag from Broken Rainbows example. Closes #110. Note that there is no commit for this update because git does not track these attribs!
Remove RO
attrib from the broken rainbows directory.
Move all of the examples in 05
into an \examples
directory since seems like new Arduino now needs this. Also renamed to 04
.
Release 1.3 for Arduino boards manager.
Includes support for directly programming new large size ATMEGA328-based blinks like BlinkMAX and BlinkNFC.
Updated release for Arduino boards manager
Mostly docs updates and cleanup.
Latest files For Arduino Board Manager
- To load into the Arduino IDE
- Go into Settings and add...
https://github.com/bigjosh/Move38-Arduino-Platform/releases/latest/download/package_move38.com-blinks_index.json
...under Additional Boards Manager URLs - Go to Tools->Board->Boards Manager
- Search for "blinks"
- Press install
Note that you might see the error "Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException..." pop up in the console, but I think you can safely ignore it.
Updates in this release include:
- Now uses Board Manager! :)
- You can now use the upload button in the Arduino IDE with any supported programmer
- New
SterileFlag
allows you to make it so a game will now download to other blinks - New
FireFly
example - New
lighten()
function - Autoseed on reset makes download to group of blinks using the hyperspeed dev programmer touch free
- New hardware sleep example
Base metal IR test program with sleep mode
Assumes factory default fuses (runs at 1Mhz).
/*
- SimpleIRTest.cpp
- This is the simplest possible IR test program.
- Is accesses the blink hardware directly with no interrupts and requires no library code (runs bare metal).
- It has three modes: TX, RX, and sleep
- TX mode
- =======
- Blink sends an IR pulse every 1ms on face IR0.
- The RGB LED on P0 shows green to indicate TX mode.
- Pushing button cycles though pulse transmitted pulse width.
- The pulse width is indicated by the number of BLUE LEDS lit:
- 1 blue = 5us
- 2 blue = 7us
- 3 blue = 10us
- 4 blue = 12us
- 5 blue = 15us
- The 'A' pin on the service port connector goes high while the IR LED is on.
- Pressing the button after the widest pulse width switches to RX mode
- RX mode
- =======
- Blink listens for an IR pulse on face IR0 every 2ms on face IR0.
- The RGB LED on face P0 shows RED to indicate RX.
- The time since the last trigger is indicated by which BLUE LEDS lit:
- P2 Cyan = <650us (Too short)
- P3 Blue = >650us and <950us (Just right)
- P4 Magenta = >950us (Too long)
- The 'A' pin on the service port connector pulses high when the IR0 LED is triggered. This pulse width is fixed and
- only indicates that a trigger happened.
- Pressing the button in RX mode goes to sleep mode
- SLEEP MODE
- ==========
- Blink goes into low power sleep.
- Pressing the button in sleep mode wakes the blink and goes to TX mode
- Usage
- =====
- You can cycle between modes and TX mode pulse times by pressing and releasing the button.
- Put one blink in TX mode and select a pulse width. Put another blink in RX mode. Aim their IR0 faces together.
- For the blink in RTX mode...
- P2 Cyan indicates that the IR LED is triggering by ambient light before the pulse arrives, or something is touching the LED
- P3 Blue indicates that pulses with expected timing are being received
- P4 Magenta in Rx mode indicates that some TX pulses are being missed
- Each of these indications will stay lit for about 0.1 second after the event so you can see it.
- If only P5 on RX lights then this is a good sign that good communication is possible.
- Connect an oscilloscope to the A pin on both blinks. Trigger on the A pin from the TX blink and watch to
- see how long it takes for the RX to trigger after the TX pulse is sent.
- Watch for the min and max of the timing between the RX and TX going high on pin A of the two blinks
- Short and consistent times are good.
*/
New bare metal IR test program
Can't really compile this with Arduino, so here is a HEX file!
Assumes all fuses in default factory state.
- SimpleIRTest.cpp
- This is the simplest possible IR test program.
- Is accesses the blink hardware directly with no interrupts and requires no library code (runs bare metal).
- It has two modes: TX and RX.
- TX mode
- =======
- Blink sends an IR pulse every 1ms on face IR0.
- The RGB LED on P0 shows green to indicate TX mode.
- The pulse width is indicated by the number of BLUE LEDS lit:
- 1 blue = 5us
- 2 blue = 7us
- 3 blue = 10us
- 4 blue = 12us
- 5 blue = 15us
- The 'A' pin on the service port connector goes high while the IR LED is on.
- RX mode
- =======
- Blink listens for an IR pulse on face IR0 every 2ms on face IR0.
- The RGB LED on face P0 shows RED to indicate RX.
- The time since the last trigger is indicated by which BLUE LEDS lit:
- P2 Cyan = <650us (Too short)
- P3 Blue = >650us and <950us (Just right)
- P4 Magenta = >950us (Too long)
- The 'A' pin on the service port connector pulses high when the IR0 LED is triggered. This pulse width is fixed and
- only indicates that a trigger happened.
- Usage
- =====
- You can cycle between modes and TX mode pulse times by pressing and releasing the button.
- Put one blink in TX mode and select a pulse width. Put another blink in RX mode. Aim their IR0 faces together.
- For the blink in RTX mode...
- P2 Cyan indicates that the IR LED is triggering by ambient light before the pulse arrives, or something is touching the LED
- P3 Blue indicates that pulses with expected timing are being received
- P4 Magenta in Rx mode indicates that some TX pulses are being missed
- Each of these indications will stay lit for about 0.1 second after the event so you can see it.
- If only P5 on RX lights then this is a good sign that good communication is possible.
- Connect an oscilloscope to the A pin on both blinks. Trigger on the A pin from the TX blink and watch to
- see how long it takes for the RX to trigger after the TX pulse is sent.
- Watch for the min and max of the timing between the RX and TX going high on pin A of the two blinks
- Short and consistent times are good.
*/
blinkOS IR test code in bareblinkOS/main.cpp
Continuously sends a magic IR packet on all faces.
Shows on face:
Color | Meaning |
---|---|
RED | Data error seen on this face since last reset |
GREEN | good packet received in the past 200ms |
BLUE | good packet received in the past 200-500ms |
OFF | good packet not seen in the past 500ms |
Error shows until you reset by pressing the button.
Each packet has one header byte and one magic cookie byte and takes about 5ms to transmit.
There is no error correction except for the intrinsic robustness you get from framing and the data header.
Currently the transmit rate is about 20hz.