SafecastBGeigie is the code for the firmware needed to run the bGeigie devices from Safecast. The necessary building blocks such as SD card logger, GPS parser, power management, etc, are included in the form of an Arduino library. The firmwares for the different devices are given as examples of this library.
- SafecastBGeigie (this library), use branch
NextGeneration
download - chibiArduino modified to use with Atmega1284p (included with patched Arduino IDE) download
- CmdArduino (included with patched Arduino IDE) download
- Mighty 1284p core files (included with patched Arduino IDE) download
- [Option] SparkFun's Pro Micro core files, if you want to use the Atmega32u4 with a bootloader download
- FTDI breakout board 3.3V, for example this one or this one
- USB male A to male mini B cable such as this one
- A Pocket AVR Programmer from SparkFun. [Using another programmer type than USBTiny type requires editing a makefile.]
- A bGeigie2 board. The PCB design files are available under CC-BY-SA 3.0 license.
- Download and install the CrossPack for AVR toolchain.
- Download and install Patched Arduino IDE Arduino's website provides help getting started, if needed.
- Download and install SafecastBGeigie library in the Arduino library folder. Arduino libraries help.
- Launch the Arduino-Safecast IDE
- Connect Pocket AVR Programmer to the ISP Pin header. Pin 1 of the ISP is marked on the PCB. Make sure the switch on the programmer is set to
No power
. Make sure the battery it attached to the board and has some charge. Make sure no SD card is inserted. - Pull low (off) the left switch on the small black dual switch on the board.
- In Arduino IDE, select
Tools -> Programmer -> USBtinyISP
, andTools -> Board -> Mighty 1284p 8MHz using Optiboot
. FinallyTools -> Burn Bootloader
. - Pull back up the left small switch. Both switches should be up (on) now.
-
Launch the Arduino-Safecast IDE
-
Connect Pocket AVR Programmer to the ISP Pin header. Pin 1 of the ISP is marked on the PCB. Make sure the switch on the programmer is set to
No power
. Make sure the battery it attached to the board and has some charge. Make sure no SD card is inserted. -
Pull low (off) the small switch on the right of the black dual switch.
-
In a terminal, go to
SDReader32u4/LowLevelMassStorage+SD
.cd <arduino_libraries_path>/SDReader32u4/LowLevelMassStorage+SD
-
Compile and upload SD reader firmware to USB microcontroller. If not using a USBtinyISP kind of AVR programmer, the makefile needs to be modified before this step.
make program
-
Pull back up the left small switch. Both switches should be up (on) now.
-
Launch the Arduino-Safecast IDE
-
Plug the FTDI breakout board on the board as shown on the picture. [picture]
-
Select Serial port corresponding to FTDI breakout board from
Tools -> Serial Port -> [my port]
. -
Open the bGeigie3 sketch from menu
Examples->SafecastBGeigie->bGeigie3
. -
Press upload button (or
File -> Upload
). -
Open the Serial terminal by pressing button (or
Tools -> Serial Monitor
), you should see something like*** Welcome to bGeigie *** Version-3.0.1 GPS start time,590ms --- Diagnostic START --- Version,3.0.1 Device ID,300 Radio initialized,yes Radio address,3300 Radio channel,20 GPS type MTK,yes GPS system startup,yes SD inserted,yes SD initialized,yes SD open file,yes SD read write,yes SD reader initialized,yes Temperature,24C Humidity,49% Battery voltage,3827mV System free RAM,13507B --- Diagnostic END --- Starting now! bGeigie sleeps... good night.
Congratulations, we're half-way there.
The sketches given in examples are the actuall firmware of the different Safecast bGeigie devices:
- bGeigieMini
- bGeigieClassic
- bGeigieNinja
- bGeigieConfigBurner
- SlidingWindowCounter
Copyright (c) 2011-2012, Robin Scheibler aka FakuFaku, Christopher Wang aka Akiba
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.