Whereas the limited memory will only have one (decent) game loaded at a
time, it will be possible to develop / configure an external loader via USB?
In my mind it could be:
A passive drive (ex .: usb pen) from which the program already
loaded on arduboy or a program previously loaded (?) On the pen drive
can show a list of games and load the one chosen by the user;List item
An active drive (ex .: PC, tablet or smartphone) via a program or an
app that automatically loads when connecting on arduboy a new program
(the loader) with a list of available games and the user’s choice is automatically loads the selected game.
A similar mechanism could be used to divide a game into chapters (or
levels) that can be loaded dynamically, something like multiple disks in
PC and PS1 old games.
Obviously the use of a simple USB stick would be extremely comfortable but I can
not think of a workable solution, while an active drive might actually
be feasible, right? Also it would allow gamers to use in a more user-friendly way their Arduboy!
(I just finished developing a weather station with Arduino and raspberry pi connected via USB)
Yes indeed this is very possible. It is not difficult to upload, especially a compiled program, to the arduino using a usb cord and your choice of python, c, java - anything you like. There have been some approaches discussed in IRC which do similar things - I would definitely hop on there and chat with some of the folks in there to flesh out your idea some.
I would focus on an active drive. Even another microcontroller could be leveraged to accomplish what you wanting.
Existing and Helpful Projects
Here is a project that will do compilation and uploading. This makefile setup can be integrated into another project to provide the mechanism for placing the compilation on the Arduboy.
As ekem said I was kicking around an idea with him in IRC to create an android app which would store all your games and then push them to the arduboy via USB. Not for actively played games but simply to load a new one instead of needoyour pc. If someone doesn’t beat me to it I may try writing it myself.
I’ve thought about this before, you could make a separate device that has an SD card and acts as a usb host to program arduinos. This would be really helpful because it could be used on not only Arduboy but anything else using the same chip! We will support anyone working on this and might take a crack at it ourselves soon enough!
This would have to be a like a type of boot loader… Arduino can read SD cards easily enough, but not run software from them. The architecture is designed to fetch the next instruction from the flash and then execute it. So we’d need like a BIOS that started when you booted the device and gave you access to the SD card… then allowed you to select a game and re-flash the device with that game, then let you play it. Of course the space the BIOS took up couldn’t be used to software. So we’d now need this “BIOS” + boot loaded, or perhaps we could combine the two be modifying and building our own boot loader with that functionality built in.
I’ve been thinking about how to load multiple games when away from a computer ever since I got my Arduboy. My thinking is around using a £4 Raspberry Pi Zero (powered by a small li-ion pack or USB powerbank) to upload games to the Arduboy via a micro-USB to micro-USB cable. The Pi would initially upload a menu app to the Arduboy so you could select your game. When selected, this would send your game selection back to the Pi via serial over USB. The Pi would then fire the relevant .hex file back over the USB. At that point, you could disconnect the Pi and the Arduboy would function as normal with your selected game stored on there. It’s only when you wanted to change the game that you’d have to reconnect the Pi.
I’m hoping to work on this idea over the next few weeks, but my Python skills are limited. If anyone else fancies having a go, let me know.
Hmm. That might be nice, but would add to the cost and complexity. And the ArduBoy already has a lovely display and buttons that I could use. My aim is to only need a few things:
Raspberry Pi Zero and SD card
USB cable between the two
USB Powerbank to power the Pi if you want to change games when you’re out and about
Is this something people would be interested in? I am, because being able to change games easily is the only feature missing from the ArduBoy as a games player IMHO. Obviously from a developer point of view, this isn’t particularly interesting because you’d be connected to a computer all the time anyway when developing!
I believe you want to use avr109 instead of avrispmkII for the programmer.
If you have the Arduino IDE running on your Pi, and are able to upload sketches using it, the best thing to do is open File > Preferences in the IDE and set Show verbose output during: upload. Then, when you upload a sketch the output will include the avrdude command line used. Even the command line used for a regular PC may be correct for a Pi as well.