Difference between revisions of "Getting started"

From Gamebuino Wiki
Jump to: navigation, search
m (Get the .HEX file from your game: formatting)
(Setup procedure simplified)
Line 9: Line 9:
  
 
=== Turn it on ===
 
=== Turn it on ===
* You just received your Gamebuino. Hurray! You should first turn it on to check that nothing has been damaged during shipping. If nothing shows up the battery may be empty or the screen may have moved.
+
You just received your Gamebuino. Hurray! You should first turn it on to check that nothing has been damaged during shipping. If nothing shows up the battery may be empty or the screen may have moved... don't panic, and head to the [[troubleshooting]] page.
  
 
=== Load games from the micro SD card ===
 
=== Load games from the micro SD card ===
Line 17: Line 17:
 
** Hold down C while you turn the power switch on then release it.
 
** Hold down C while you turn the power switch on then release it.
 
** Press C in the Gamebuino title screen
 
** Press C in the Gamebuino title screen
* '''Note:''' You should always get back to the title screen of the game and press 'C' to flash the loader before you turn your Gamebuino off, load another program through USB, or eject the micro SD card. It will avoid to mess up your saved games, as the EEPROM is backed up in a .SAV file when you switch from a game to the loader, and restored when you select a game from the loader.
+
'''Note:''' You should always get back to the title screen of the game and press 'C' to flash the loader before you turn your Gamebuino off, load another program through USB, or eject the micro SD card. It will avoid to mess up your saved games, as the EEPROM is backed up in a .SAV file when you switch from a game to the loader, and restored when you select a game from the loader.
  
 
=== Change the default settings ===
 
=== Change the default settings ===
Line 30: Line 30:
  
 
=== Charge the battery ===
 
=== Charge the battery ===
* You may want to charge your Gamebuino's battery when you receive it.
+
You may want to charge your Gamebuino's battery when you receive it. To load the battery, you just have to connect your Gamebuino to an USB port (from your computer or an outlet charger) using the provided micro USB cable. The "charging" LED will turn on (the one beneath the lightning bolt battery symbol) until it's fully charged. Then, the "charged" LED will turn on (the one beneath to the full battery symbol). Note that your Gamebuino will charge faster if turned off and that a charged battery will give you at least 8 hours of continuous play.
* To load the battery, you just have to connect your Gamebuino to an USB port (from your computer or an outlet charger) using the provided micro USB cable. The "charging" LED will turn on (the one beneath the lightning bolt battery symbol) until it's fully charged. Then, the "charged" LED will turn on (the one beneath to the full battery symbol).
 
* Your Gamebuino will charge faster if turned off.
 
* A charged battery will give you at least 8 hours of continuous play.
 
  
 
=== Remove the paper cover ===
 
=== Remove the paper cover ===
 +
The transparent acrylic case is covered with a brown paper protection. Some may want to keep it, some may want to remove it. It's up to you!
 
[[File:Remove paper cover.jpg]]
 
[[File:Remove paper cover.jpg]]
* The transparent acrylic case is covered with a brown paper protection. Some people may want to keep it, some may want to remove it.
 
* First, check that your Gamebuino works fine.
 
* Dismantle it:
 
** Unscrew the 4 short screws on the back side first
 
** Remove the back plate
 
** Unscrew the 4 white nylon spacers
 
** Remove the PCB
 
** Unscrew the 4 long screws on the front side last
 
* Remove the paper cover. Be careful not to scratch the acrylic
 
* Check that everything still works fine (especially the display)
 
* Assemble back your Gamebuino:
 
** Be gentle when you tighten the screws or you may damage the nylon spacers
 
** Screw the 4 long screws with 4 nylon spacers on the top plate (be careful to put it on the right side)
 
** Put the screen holder on the two upper nylon spacer
 
** Put the PCB in place, check that buttons are correctly placed int their holes
 
** Screw 4 nylon spacer to hold the PCB in place
 
** Add the back plate and screw it with the 4 short screws
 
** You might want to add a spacer between the back plate and the PCB to limit the PCB bending because of screen pressure
 
  
== Upload a program through USB ==
+
== Software setup ==
  
 
=== Install the Arduino software ===
 
=== Install the Arduino software ===
Line 66: Line 46:
 
=== Install the Gamebuino Library ===
 
=== Install the Gamebuino Library ===
  
* Download and the [https://github.com/Rodot/Gamebuino/archive/master.zip Gamebuino library]
+
* Download and the Gamebuino library's [https://github.com/Rodot/Gamebuino/archive/master.zip archive] and extract it (more download in the [[download]] page).
* Extract the archive
+
* Copy the "libraries" and "hardware" folders to the Arduino sketchbook folder. To find its location start the Arduino software and click in the menu bar on Sketch/Show Sketch Folder (or press Ctrl+K). You can change the sketch folder location in Arduino's preferences.
* Mac users: you can follow this [http://gamebuino.com/forum/viewtopic.php?f=12&t=875&p=3501#p3501 video tutorial].
+
* To check that the library is correctly installed re-start the Arduino software and click on File/Examples, you should find "Gamebuino".
* Copy the folders "Gamebuino" and "tinyFat" located in /libraries and paste them in /Arduino/libraries (where you installed Arduino). On Mac: Put them in documents/Arduino/libraries
 
*'''Note:''' On Linux, you may have to open the terminal and use the command "sudo chmod -R ugo+rw /usr/share/arduino" before you can put the libraries or bootloader in their respective places in /usr/share/arduino.
 
* Copy the folder "gamebuino_boot" from the archive to /Arduino/hardware/arduino/bootloaders. On Mac: Right-click the Arduino-Application in your Programs-folder. Select "Show package contents", then search in this folder for "bootloaders" and copy the folder there.
 
* To check that the library is correctly installed, start the Arduino software, and click on File/Examples, you should find "Gamebuino".
 
 
 
=== Add Gamebuino to boards.txt ===
 
 
 
* Navigate to the folder where you installed Arduino
 
* Open Arduino/hardware/arduino/boards.txt
 
* On Linux, open the terminal and enter the command "sudo chmod -R ugo+rw /etc/arduino" before opening the file.
 
* Add the following at the beginning of the file and save it
 
 
 
<pre>
 
 
 
##############################################################
 
gamebuino.name=Gamebuino
 
gamebuino.upload.tool=avrdude
 
gamebuino.upload.protocol=arduino
 
gamebuino.upload.maximum_size=30592
 
gamebuino.upload.maximum_ram_size=2048
 
gamebuino.upload.speed=115200
 
gamebuino.bootloader.low_fuses=0xff
 
gamebuino.bootloader.high_fuses=0xda
 
gamebuino.bootloader.extended_fuses=0x05
 
gamebuino.bootloader.path=gamebuino_boot
 
gamebuino.bootloader.file=gamebuino_boot.hex
 
gamebuino.bootloader.unlock_bits=0x3F
 
gamebuino.bootloader.lock_bits=0x0F
 
gamebuino.build.mcu=atmega328p
 
gamebuino.build.f_cpu=16000000L
 
gamebuino.build.core=arduino
 
gamebuino.build.variant=standard
 
##############################################################
 
 
 
</pre>
 
* Restart the Arduino Software
 
 
* Now you should be able to set the device to Gamebuino by selecting Tools/boards/Gamebuino in the menu bar.
 
* Now you should be able to set the device to Gamebuino by selecting Tools/boards/Gamebuino in the menu bar.
  
 
=== Install the drivers ===
 
=== Install the drivers ===
  
* Note: your Gamebuino should be turned on when you connect it to the computer
+
If you need help installing the drivers, refer to [http://arduino.cc/en/Guide/HomePage the Arduino guide] ([http://arduino.cc/en/Guide/Windows#toc4 Windows], [http://arduino.cc/en/Guide/MacOSX#toc3 MacOSX], [http://playground.arduino.cc/Learning/Linux Linux]). Note that your Gamebuino should be turned on when you connect it to the computer
* Note: drivers should be installed automatically on Windows if you used the installer
 
* Drivers are located in the Arduino/drivers folder
 
* If you need help installing the drivers, refer to [http://arduino.cc/en/Guide/HomePage the Arduino guide]
 
  
=== Upload a game ===
+
== Upload a game through USB ==
  
 
* Start the Arduino software
 
* Start the Arduino software
* Open an example by clicking File/Examples/Gamebuino/ If you don't find it, check that you correctly installed the Gamebuino library
+
* Click on File/Examples/Gamebuino/ and open an example. If there is no Gamebuino folder, check that you correctly installed the library.
* Select the right device by selecting Tools/boards/Gamebuino
+
* Click on Tools/boards/Gamebuino to set the right device.
* Select the right serial port in Tools/Serial Port. If it's grayed out check that you have correctly installed the drivers, that your Gamebuino is turned on, and that the cable is working and correctly plugged in.
+
* Click on Tools/Serial Port and select the one corresponding to your Gamebuino. If it's grayed out check that you have correctly installed the drivers, that your Gamebuino is turned on, and that the cable is working and correctly plugged in.
 
* Click on "Upload" or press Ctrl+U
 
* Click on "Upload" or press Ctrl+U
  
Line 125: Line 66:
  
 
== Put games on the micro SD card ==
 
== Put games on the micro SD card ==
* Game files which can be loaded on the Gamebuino from the SD card are .HEX files.
+
=== Get an .HEX ===
* You can get .HEX files of the default programs on [https://github.com/Rodot/Gamebuino GitHub], and .HEX file of other people's games in the forum in the [http://gamebuino.com/forum/viewforum.php?f=17 Games Gallery].
+
You need a compiled game in the .HEX format to be able to flash it from the micro SD card. .HEX can also be used to run games in the Simbuino emulator (see [[Download]]). You can get the latest version of the default games and programs (loader.hex, settings.hex) on [https://github.com/Rodot/Gamebuino GitHub]. You can find people game's in the [[Games]] Gallery.
=== Get the .HEX file from your game ===
+
=== Make your own .HEX ===
 
* Start the Arduino software
 
* Start the Arduino software
 
* Click on File/Preferences and check "Show verbose output during compilation"
 
* Click on File/Preferences and check "Show verbose output during compilation"
 
* Compile your program (Ctrl+R)
 
* Compile your program (Ctrl+R)
* A lot of text will scroll in the black area at the bottom of the window
+
* A lot of text will scroll in the black area at the bottom of the window. The build directory path will be displayed there, and should looke something like:
* Find the build directory for your program:
+
** Windows: <code>"C:\Users\Username\AppData\Local\Temp\build[random number].tmp\a_Hello.cpp.hex"</code>. If you use the [http://forum.arduino.cc/index.php?topic=118440.0 Arduino Enhanced Release], simply press Ctrl+Alt+R to open the current build folder.
** Windows: <code>"C:\Users\Username\AppData\Local\Temp\build[random number].tmp\a_Hello.cpp.hex"</code>
 
 
** GNU/Linux: <code>"/tmp/build[random number].tmp/a_Hello.cpp.hex"</code>
 
** GNU/Linux: <code>"/tmp/build[random number].tmp/a_Hello.cpp.hex"</code>
** If you use the [http://forum.arduino.cc/index.php?topic=118440.0 Arduino Enhanced Release], just press Ctrl+Alt+R to open the current build folder.
+
* You can also change the build path in <code>"arduino/lib/preferences.txt"</code> by changing the line <code>#build.path=</code> to <code>build.path=(directory you want)</code>.
** If you don't use the enhanced release, you can simply go to <code>"arduino/lib/preferences.txt"</code> and change the line <code>#build.path=</code> to <code>build.path=(directory you want)</code>.
 
 
* Navigate to this folder and find the .hex file with the name of your program
 
* Navigate to this folder and find the .hex file with the name of your program
 
* Rename it to a 8:3 format: only capitals, 8 characters max for the name and .HEX extension. For example: CRABATOR.HEX or PONG.HEX
 
* Rename it to a 8:3 format: only capitals, 8 characters max for the name and .HEX extension. For example: CRABATOR.HEX or PONG.HEX
  
 
=== Put it on the micro SD card ===
 
=== Put it on the micro SD card ===
* Put that file on your micro SD card using the micro SD adapter provided.
+
Put your .HEX file with a 8:3 name on your micro SD card using the micro SD adapter provided. You can now select the .HEX file on your Gamebuino to load it on the go, without a computer! Do '''NOT''' turn off your Gamebuino while flashing.
* You're ready to go!
 
 
 
== How to make your own games ==
 
* If you never programmed before, you should read the [http://arduino.cc/en/Tutorial/Foundations Arduino Foundations] page to understand... foundations.
 
* You should explore the basic [[Examples]], try to understand them, change things an see what happens. There is a lot of comments in the examples, so it should be easy to understand. If there is something you don't get, take a look at the [http://arduino.cc/en/Reference/HomePage Arduino Reference] for general purpose things, and the Gamebuino [[Reference]] for Gamebuino-specific functions. Open the examples in the Arduino software by clicking File/Examples/Gamebuino/basics.
 
  
 
== See Also ==
 
== See Also ==
* [[Reference]]
+
* [[Troubleshooting]]
* [[Examples]]
+
* [[Learning]]
* [https://github.com/Rodot/Gamebuino Gamebuino on Github]
+
* [[Games]]

Revision as of 2014-09-06T11:43:56

Get a Gamebuino

For an overall presentation head to the home page or indiegogo page.

As the indiegogo campaign is over, you can't order a Gamebuino for now. But you can subscribe to the newsletter to know when they'll be available for order again.

Use your Gamebuino

Error creating thumbnail: Unable to save thumbnail to destination

Turn it on

You just received your Gamebuino. Hurray! You should first turn it on to check that nothing has been damaged during shipping. If nothing shows up the battery may be empty or the screen may have moved... don't panic, and head to the troubleshooting page.

Load games from the micro SD card

Error creating thumbnail: Unable to save thumbnail to destination
  • Make sure that the provided SD card is correctly inserted in its socket.
  • The game browser is named LOADER.HEX. There are several ways to load it:
    • Hold down C while you turn the power switch on then release it.
    • Press C in the Gamebuino title screen

Note: You should always get back to the title screen of the game and press 'C' to flash the loader before you turn your Gamebuino off, load another program through USB, or eject the micro SD card. It will avoid to mess up your saved games, as the EEPROM is backed up in a .SAV file when you switch from a game to the loader, and restored when you select a game from the loader.

Change the default settings

Error creating thumbnail: Unable to save thumbnail to destination
  • Load SETTINGS.HEX
  • Select "See all settings" to know what can be adjusted. These settings are stored directly in the Gamebuino and will be shared between different games.
  • You should adjust these two settings at least:
    • Display contrast
    • Default username
  • You can leave the other settings at their default value, it should be okay.
  • Don't forget to select "save" before you exit.

Charge the battery

You may want to charge your Gamebuino's battery when you receive it. To load the battery, you just have to connect your Gamebuino to an USB port (from your computer or an outlet charger) using the provided micro USB cable. The "charging" LED will turn on (the one beneath the lightning bolt battery symbol) until it's fully charged. Then, the "charged" LED will turn on (the one beneath to the full battery symbol). Note that your Gamebuino will charge faster if turned off and that a charged battery will give you at least 8 hours of continuous play.

Remove the paper cover

The transparent acrylic case is covered with a brown paper protection. Some may want to keep it, some may want to remove it. It's up to you!

Error creating thumbnail: Unable to save thumbnail to destination

Software setup

Install the Arduino software

  • Download the Arduino application here and follow instructions to install it.
  • If you're using Windows, you may want to use the Arduino Enhanced Release.
  • Note: If you are using a package manager to install Arduino, make sure it installs Arduino 1.0.5 (version 1.0 won't work).

Install the Gamebuino Library

  • Download and the Gamebuino library's archive and extract it (more download in the download page).
  • Copy the "libraries" and "hardware" folders to the Arduino sketchbook folder. To find its location start the Arduino software and click in the menu bar on Sketch/Show Sketch Folder (or press Ctrl+K). You can change the sketch folder location in Arduino's preferences.
  • To check that the library is correctly installed re-start the Arduino software and click on File/Examples, you should find "Gamebuino".
  • Now you should be able to set the device to Gamebuino by selecting Tools/boards/Gamebuino in the menu bar.

Install the drivers

If you need help installing the drivers, refer to the Arduino guide (Windows, MacOSX, Linux). Note that your Gamebuino should be turned on when you connect it to the computer

Upload a game through USB

  • Start the Arduino software
  • Click on File/Examples/Gamebuino/ and open an example. If there is no Gamebuino folder, check that you correctly installed the library.
  • Click on Tools/boards/Gamebuino to set the right device.
  • Click on Tools/Serial Port and select the one corresponding to your Gamebuino. If it's grayed out check that you have correctly installed the drivers, that your Gamebuino is turned on, and that the cable is working and correctly plugged in.
  • Click on "Upload" or press Ctrl+U

You just uploaded your first Gamebuino game, congratulations !

Put games on the micro SD card

Get an .HEX

You need a compiled game in the .HEX format to be able to flash it from the micro SD card. .HEX can also be used to run games in the Simbuino emulator (see Download). You can get the latest version of the default games and programs (loader.hex, settings.hex) on GitHub. You can find people game's in the Games Gallery.

Make your own .HEX

  • Start the Arduino software
  • Click on File/Preferences and check "Show verbose output during compilation"
  • Compile your program (Ctrl+R)
  • A lot of text will scroll in the black area at the bottom of the window. The build directory path will be displayed there, and should looke something like:
    • Windows: "C:\Users\Username\AppData\Local\Temp\build[random number].tmp\a_Hello.cpp.hex". If you use the Arduino Enhanced Release, simply press Ctrl+Alt+R to open the current build folder.
    • GNU/Linux: "/tmp/build[random number].tmp/a_Hello.cpp.hex"
  • You can also change the build path in "arduino/lib/preferences.txt" by changing the line #build.path= to build.path=(directory you want).
  • Navigate to this folder and find the .hex file with the name of your program
  • Rename it to a 8:3 format: only capitals, 8 characters max for the name and .HEX extension. For example: CRABATOR.HEX or PONG.HEX

Put it on the micro SD card

Put your .HEX file with a 8:3 name on your micro SD card using the micro SD adapter provided. You can now select the .HEX file on your Gamebuino to load it on the go, without a computer! Do NOT turn off your Gamebuino while flashing.

See Also