Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7b7211d
Merge pull request #83 from bigjosh/dev
jbobrow Jun 16, 2020
284d5bc
Add `sterileFlag` to enable creation of blinks that do not seed thier…
Jun 16, 2020
bda4424
Make programmer menu selection work even when using `Upload` button
Jun 16, 2020
833c509
Merge pull request #85 from bigjosh/dev
jbobrow Jun 16, 2020
d8a6098
Update Comment
Jun 30, 2020
c4f4f10
Update package_move38.com-blinks_index.json
Jun 30, 2020
2e4c03b
Update package_move38.com-blinks_index.json
Jun 30, 2020
93af6f8
Update readme.MD
Jul 7, 2020
915b0f6
Added `TheNorthFace` demo
Jul 11, 2020
e2ebb50
Merge branch 'main' of https://github.com/bigjosh/Move38-Arduino-Plat…
Jul 11, 2020
a143c28
Added Broken Rainbow example
Aug 1, 2020
dca6b1d
Delete desktop.ini
Aug 2, 2020
82ae55c
Merge pull request #97 from bigjosh/main
Aug 2, 2020
66247f7
Merge pull request #96 from Move38/dev
Aug 2, 2020
2e7acda
Fix button click detection after sleep.
Sep 1, 2020
3ff5694
Merge pull request #99 from brunoga/main
Sep 13, 2020
4ea4ddf
Remove `sterlieFlag`
Sep 14, 2020
fe13b69
Merge branch 'main' into dev
Sep 14, 2020
0142d99
Clean up - mostly updated documention files.
Sep 15, 2020
8066785
Update README.md
Sep 15, 2020
db475e6
Update README.md
Sep 15, 2020
7828ad5
More documentation cleanup
Sep 15, 2020
5b48135
Merge pull request #101 from bigjosh/dev
Sep 15, 2020
8911ee3
Clean up `blinklib.h` comments. Remove unneeded tools in package file.
Sep 16, 2020
c57d7a5
Merge pull request #102 from bigjosh/dev
Sep 16, 2020
e598753
Update boardsmanager file URL
Oct 17, 2020
6c7ca1a
Add `BareMetalSerial` example.
Mar 3, 2021
f8a710a
Update BareMetalSerialDemo.ino
Mar 3, 2021
7d79e06
Update BareMetalSerialDemo.ino
Mar 3, 2021
38d2522
Update BareMetalSerialDemo.ino
Mar 3, 2021
391cef8
Boards.txt and platform.txt updated for new blink328 board type
May 10, 2021
ad00fdd
Update fuses for new blinks328 and make `burn bootloader` work.
May 12, 2021
9467675
Fix fuse vales
May 12, 2021
c0cdf34
Last try
May 12, 2021
10ef981
Break out linkscripts by part and update `vector` table to point to b…
May 13, 2021
7f32f6f
Downgrade blink328
May 14, 2021
aee54f5
Not working, gets errorMode(3) after download somehow.
May 16, 2021
e070ea0
Switch 328->328PB. Force interrupt vector table on 328 to be at the s…
May 24, 2021
754e4dc
Get rid of volatile warning
May 25, 2021
62cfa66
Add blinkMAX board type
May 25, 2021
919616b
New support for 328 and 328MAX blinks
Jul 2, 2021
65023e1
Update boards.txt
Jul 3, 2021
de8ba90
Bring the manually edited projects on home back into AS7
Jul 3, 2021
9e909f1
All three variants up to date
Jul 3, 2021
b6d155a
Give the linker a little more room that it should not need
Jul 9, 2021
afff96b
Now `Export Binary` actually creates a binary (not just HEX)
Sep 4, 2021
aa3e68c
Create NFC board type
Oct 2, 2021
ac59745
Update boards.txt
Nov 4, 2021
fe4ffc5
Fix `platform.txt` to make exported binaries include the `.data` section
Nov 26, 2021
3600e4f
Update BlinkBIOS-328PB-MAX-NFC.hex
Dec 1, 2021
dd9053b
New `saveGameStat()` plus `isNFC()` and `isMAX()` functions
Dec 18, 2021
cd0a647
Create SuperColor demo
Dec 21, 2021
d4b0bf0
Add SuperColor header files
Dec 21, 2021
cdd78c6
Update SuperColor.ino
Apr 25, 2022
d8a9d2a
Merge pull request #106 from bigjosh/add-NFC
Apr 25, 2022
c0ab8ea
Merge pull request #107 from bigjosh/main
Apr 25, 2022
4f44ffe
Merge pull request #108 from bigjosh/dev
Apr 25, 2022
194dc25
Replace broken arrow map PDF with PNG
Apr 25, 2022
b467127
Merge branch 'main' of https://github.com/bigjosh/Move38-Arduino-Plat…
Apr 25, 2022
137bb70
Create howto-release.md
Apr 25, 2022
1248031
Update howto-release.md
Apr 25, 2022
a3ab323
Fix 1/2 speed on wake from NFC download
May 28, 2022
957ad19
Merge branch 'main' of https://github.com/bigjosh/Move38-Arduino-Plat…
May 28, 2022
bfb5866
Rename problem broken rainbow PNG file to try to work around #110
Feb 23, 2023
47fd3f1
Make Examples folder work with new Arduino IDE 2.x
Feb 23, 2023
800e110
Update publishing notes
Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions AS7/blinklib/blinklib/blinklib.atsln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Atmel Studio Solution File, Format Version 11.00
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "blinklib", "blinklib.cppproj", "{1D617D28-32B2-45AB-BA7F-EE884B221598}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AVR = Debug|AVR
Release|AVR = Release|AVR
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D617D28-32B2-45AB-BA7F-EE884B221598}.Debug|AVR.ActiveCfg = Debug|AVR
{1D617D28-32B2-45AB-BA7F-EE884B221598}.Debug|AVR.Build.0 = Debug|AVR
{1D617D28-32B2-45AB-BA7F-EE884B221598}.Release|AVR.ActiveCfg = Release|AVR
{1D617D28-32B2-45AB-BA7F-EE884B221598}.Release|AVR.Build.0 = Release|AVR
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
8 changes: 8 additions & 0 deletions AS7/blinklib/blinklib/blinklib.cppproj
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@
<SubType>compile</SubType>
<Link>DummySerial.h</Link>
</Compile>
<Compile Include="..\..\..\cores\blinklib\gamestat.cpp">
<SubType>compile</SubType>
<Link>gamestat.cpp</Link>
</Compile>
<Compile Include="..\..\..\cores\blinklib\gamestat.h">
<SubType>compile</SubType>
<Link>gamestat.h</Link>
</Compile>
<Compile Include="..\..\..\cores\blinklib\main.cpp">
<SubType>compile</SubType>
<Link>main.cpp</Link>
Expand Down
66 changes: 0 additions & 66 deletions Getting-started.md

This file was deleted.

50 changes: 0 additions & 50 deletions Layers.md

This file was deleted.

30 changes: 28 additions & 2 deletions Production.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Each virgin blink needs to be programmed with...

### Fuses

#### ATMEGA168

The only change from factory default is the fuse that enables jumping to the bootloader on reset (BOOTRST).

BOOTSZ = 1024W_1C00
BOOTRST = [X]
RSTDISBL = [ ]
Expand All @@ -26,6 +30,28 @@ LOW = 0x62 (valid)

Note that the `high` and `low` fuses are the same as their default values from the factory, but the `extended` fuse must be reprogrammed from the default value.

#### ATMEGA328

The only change from factory default is the fuse that enables jumping to the bootloader on reset (BOOTRST).

BODLEVEL = DISABLED
RSTDISBL = [ ]
DWEN = [ ]
SPIEN = [X]
WDTON = [ ]
EESAVE = [ ]
BOOTSZ = 2048W_3800
BOOTRST = [X]
CKDIV8 = [X]
CKOUT = [ ]
SUT_CKSEL = INTRCOSC_8MHZ_6CK_14CK_65MS

EXTENDED = 0xFF (valid)
HIGH = 0xD8 (valid)
LOW = 0x62 (valid)

Note that the `extended` and `low` fuses are the same as their default values from the factory, but the `high` fuse must be reprogrammed from the default value.

### Bootloader

The bootloader code comes from a different repo and can be found in the [`bootloaders`](/bootloaders) directory here.
Expand All @@ -40,7 +66,7 @@ You can minimize the number of production programming steps by combining the app

### Example

Here is and example command that will program a blink using the `AVRDUDE` utility and the `USBtiny` programmer...
Here is and example command that will program a `atmega168pb` blink using the `AVRDUDE` utility and the `USBtiny` programmer...

```
avrdude -B 5 -v -patmega168pb -cusbtiny -Uflash:w:SKETCHNAME.ino.with_bootloader.standard.hex:i -Uefuse:w:0xf8:m -u
Expand All @@ -64,7 +90,7 @@ avrdude -B 4 -D -v -patmega168pb -cusbtiny -Uflash:w:D-TimerFlashX.ino.with_boot
```

`-D` skips erasing the flash before programming it. If you are programming virgin chips then the flash should be blank.
`-B` lowered to 4 slightly increases the programmer clock. Some out of spec chips might fall to program at this speed.
`-B` lowered to 4 slightly increases the programmer clock, which reduces programming time. Note that some units might fail at this increased speed.

Note that these new options are both safe because the verify will fail if anything goes wrong.

Expand Down
70 changes: 43 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,65 @@
# Move38 Blinks for the Arduino IDE
An Arduino core for the Blinks gaming tile. More info at...
http://move38.com
# Blinks Software Development Kit (SDK) for Arduino

## Roadmap
This SDK includes all the software and configuration files to tell the Arduino IDE how to download programs in a blink along with some examples you can try out and modify.

This core requires at least Arduino IDE v1.6.2, where v1.6.5+ is recommended. <br/>
* [Programmers](#programmers)
* **[How to install](#how-to-install)**
* **[Getting started](#getting-started)**
These instructions will get you set up to write your own games for the [Blinks platform](https://move38.com/pages/blinks-collection) using the Arduino IDE.

Covers installing this repo so that you can write and download code into a Blinks tile using the Arduino IDE.
Note that you do not need any of this if you just want to *play* blinks games, only if you want to write them.

Ends with loading a `HelloBlink` program it a tile.

### Writing games
## Getting Started

The best way to start writing games is to work your way though the examples in the "File->Examples->Examples for Blink Tile" menu in the Arduino IDE (after you have installed this repo as described in the Getting Started above).

### Software setup

### [Service Port](Service Port.MD)
1. Download and run the latest version of the[ Arduino IDE](https://www.arduino.cc/en/Main/Software#download)
2. Go into File->Preferences->Settings and add...
`https://boardsmanager.com/package_move38.com-blinks_index.json`
...under Additional Boards Manager URLs. If you already have something there, you can use a comma to separate the multiple entries
3. Go to Tools->Board->Boards Manager and search for "blinks"
4. Press install on "Blinks by Move38"
5. Pick "Tools->Board->Move38->blink" from the menus
5. Go to "File->Example->Getting Started->Button Press" to load an example program
6. Program the `Button Press` example code into a blink (see below)

Describes the service port connector on each blink. Lets you add `print` statements to your programs, which can be very helpful during development.

## How to install
### Getting your code programmed into a blink

Click on the "Download ZIP" button in the upper right corner of this repo. Extract the ZIP file, and move the extracted files to the location "**~/Documents/Arduino/hardware/Move38-manual/avr**". Create the folder if it doesn't exist. This readme file should be located at "**~/Documents/Arduino/hardware/Move38-manual/avr/README.md**" when you are done.
Each blink can hold a game in its on-board flash memory. Once a blink has a game programmed into it, it can also share to other blinks over the IR links.

Open Arduino IDE, and a new category in the boards menu called "Move38-manual" will show up.
You will need a programmer, a cable, and a connector to get your code from the Arduino IDE into a blink's flash.

The [Blinks Developer Kit](https://move38.com/products/bare-bones-dev-kit) that includes everything you need to start programming your own games, including a a special blink that connects to an included USB programmer to make downloading your code as easy as pushing the "upload" button in the Ardunio IDE. If you have the dev kit, follow the enclosed instructions to select the correct programmer in the IDE and everything should just work.

But you do not need the dev kit to write your own games. Blinks can be programmed with any Arduino-compatible "AVR ISP" programmer and there are hundreds of these available everywhere. You can even use an[ Arduino UNO board plus a few wires](https://www.arduino.cc/en/Tutorial/ArduinoISP#toc2) to program any blink though the 6-pin In System Programming (ISP) connector inside the battery compartment (the arrow marks pin #1).

In the future, we'll offer a simplified Arduino Boards Manager install path.
## What is Arduino?

### Notes
The Arduino IDE is an an integrated development environment that makes it easy to write and download code to compatible microcontroller boards - and every blink is an Arduino compatible board.

* We called the "vendor/maintainer" folder `Move38-manual` so that you can also use the boards manager and you will be able to tell the two apart in the boards menu.
We write a program in the IDE using Arduino programming language (basically the C/C++) and then we use a programmer to download the compiled program into a blink.

* You must manually create the `avr` folder and you must also manually move the files out from this repo into this folder. We could not automatically have the folds inside the repo match the Arduino required folder layout because in in the boards manager, the architecture is in the JSON file rather than the folder structure. Arg.
## The `blinklib` library

* The "**~/Documents/Arduino/hardware/Move38-manual/avr**" folder is a Git repo and is also set up for easy editing in Atmel Studio with a solution inside the `\AS7` sub-folder.
When you pick "blink" from the boards menu, you configure the Arduino IDE to automatically include a set of binks-specific functions whenever it compiles your code. You use these functions to set the colors on the blink's LEDs and check for button presses and send messages over the IR links and everything else a blink can do. You can see all the available `blinklib` functions [here](cores/blinklib/blinklib.h).

### API Layers
## Serial support

The blinks hardware can do incredible things, and you can have unfettered access to it at any level you want. This documents describes those layers from bare metal up.
Each blink also has a built in serial port so you can add `printf` statements to your code and view the resulting output on a computer running a serial terminal program. Again, each blink dev kit includes a cable and a USB serial board to make this plug and play, but you can also connect the wires yourself to any serial port than can accept 3.3 - 5 volt signals. More info on serial [here](Service Port.MD).

## Making changes to the open source `blinklib` library

You can make a fork of this repo and then clone it you the machine that you have the Arduino IDE installed on. Then add a symbolic link called `avr` to the top directory of the cloned repo (the directory with this readme in it) to the `Arduino/hardware/move38` directory. So, for example, on my windows machine I made the symbolic link with the commands...

#### Hardware Abstraction Layer
```
d:
cd D:\Documents\Arduino\hardware
mkdir move38
cd move38
mklink /D avr D:\Github\Move38-Arduino-Platform
```

Most programmers will want to use the high level `blinks` API, but if you want to get closer to the hardware you can directly call into the `HAL` (Hardware Abstraction Layer) that the `blinks` API is built on top of. Documentation for this layer is in the [README.md](cores/blinkcore/README.md) in the `cores/blinkscore` folder.
Quit out of the IDE and reload and you should see a new choice under the `boards` menu.

We are always grateful for pull requests with bug fixes. For new features, best to discuss first [in the forums](https://forum.move38.com/c/softwareresources/9) to see what other think and if anyone is already working on something similar.

###
5 changes: 0 additions & 5 deletions Tools.md

This file was deleted.

Loading