I have seen videos on the arduboy reset button and I think you have to use it every time you want to switch a game.Any help will be great.
No, not at all.
The reset button is never needed to upload a game and should only be used if something is terribly wrong.
That is, use the reset button if your unit is bricked. If the screen is blank and the flashlight-mode won’t turn on, then yes consider using the reset button, but it is not needed for uploading games.
General Steps in Uploading a Game
In order to upload a new game, simply:
- Plug the Arduboy into your computer.
- Turn on the Arduboy.
- Load and verify a sketch.
- Select the appropriate board.
- Upload it to the Arduboy.
We will probably publish some videos in the future on this, but to just to reiterate, you do not need to press the reset button unless your Arduboy is not working at all, i.e. the screen is black and the flashlight-mode will not turn on.
Try Codebender for the easiest method to upload games, I think, unless you have the Arduino IDE installed already. The Codebender setup simply requires a Chrome extension be installed, and the Arduboy boards will be selectable from a list of pre-installed hardware definitions on the Codebender site.
With Codebender you can select the Arduboy or Arduboy Devkit from their drop down list, and quickly set the upload target to match your device.
Add Arduboy as Selection to Arduino IDE
See the thread below for @MLXXXp’s useful guide on adding the Arduboy to the Arudino IDE.
The Kickstarter Quick-start guide has also been updated, and outlines this process in full.
This video might also be instructive, it should offer a quick view on what the process will look like through the Arduino IDE.
Thank you for the advice
I’ve been laying out out some ideas for a “USB Keyboard” related functionality, and testing some basics on an Arduino Micro.
The one thing I have found is that getting a nice “keyboard” functionality out of the Micro means working to bypass any attempt by the Micro to bring up the default connectivity and getting to USB keyboard fairly quickly. The key reason for this is to avoid trying to install Arduino drivers on computers where you just want the keyboard and have no intent of ever doing a software change. This is ok, because the default bootloader for the Micro now has the setup where doing a software update requires hitting the reset button.
When I read through your description of plugging in to a PC, I get the impression that the Arduboy will always trigger the default processes, and that getting to “usb keyboard” without the PC throwing up windows about driver installs may be almost impossible.
Am I misunderstanding on this? Will it be possible for a sketch to take special actions and kick the Arduboy into a state where it skips over the normal startup, and goes direct to usb keyboard? And then - such a sketch would always require the reset button to load new software. Alternatively could such a sketch have a user initiated function to do a soft restart into a software load state?
(awaiting my five arduboys, when this process should become clearer)
Hey, if I am understanding your question correctly, when an Arduboy is plugged into a USB port on a PC and is powered, the OS will determine what happens in response. This is my understanding of it at least. For example, if you run an instance of Linux without X and a fully fleshed out dekstop, one that included USB tools, then you will need to activate the drivers using
modrpobe and add yourself to the
dialout group before being to handle the file descriptor available in
See this link for more information, http://playground.arduino.cc/Linux/Debian.
So, if you want to get fancy with what you are doing as an embedded programmer and designer, I would defiantly give Linux a shot for this project. A raspberry Pi is cheap and off your main computer, it may just do the task you are after.
I’m fairly certain I was not accurately communicating what I’m looking at!
One of the first things I want to try is a minimalistic “BIOS keyboard”. Many wireless keyboards will not work for doing BIOS setup. Having an ultramini Arduboy keyboard that gives you cursor keys (the D-pad) and menu options for most other keys – very slow, but capable – would let you carry a very compact keyboard alternative instead of lugging around a full wired usb keyboard for the rare time you need it.
The ATmega32u4 can happily run as a USB keyboard. As such, once programmed, it can plug into any system that understands basic USB HID - which might be a Windows computer, or a Linux computer, or any other device that you could plug a USB keyboard into.
But for that functionality to really fly, the ATmega32u4 device – in our case, the Arduboy – needs to only ever look like a USB keyboard, and not ever appear to be the device that needs special or serial port drivers. This will work for almost all the places you want to plug in, because USB keyboard functionality is widespread and never needs new drivers.
The OS on a PC only determines what happens in response to an indication from the USB client (the Arduboy) as to what type of device it wants to be. What I am after is to only have the Arduboy claim to be a keyboard (or mouse, or joystick) so that is all the PC ever sees. The only time this would be different is when the user initiates - via a function in the sketch - the “restart for software load” function. THEN the Arduboy kicks over to look like a serial port, and can have a new sketch loaded.
I know the device has USB descriptors, but I have not played around with them much.
USB hid is build in, just make a sketch.
here is an example: Arduboy Gamepad - Map buttons to keys!
Once the device has booted, it switches to USB hid, BUT you have to make the sketch using keyboard.h of course.
I can’t say for sure, but this might be possible by loading only the sketch and not the bootloader. It depends on whose code is actually setting up the “non-keyboard/mouse” USB functionality.
However you will need an external programmer and access to the proper pins on the Arduino/Arduboy in order to do this. A second Arduino can be used as a programmer. Personally, I use a cheap USBASP clone as a programmer, which works well.
Well, I do have the external programmer, so that would solve it for me.
But for any level of distribution to Arduboy owners, it’s a non-starter.
I’m curious about the startup sequence, because the Arduino loaders long ago stepped over this problem and, as far as I can tell, jump straight to the sketch with no delay, and only delay for a software load on a reset button. I had to carefully do a “wire reset” on a “beetle(leonardo) compatible” (thing is the size of my fingernail!!) to load new software.
So, let me theorize for a moment here about what would resolve this and help a few other issues at the same time.
- Bootloader start screen shows a logo and does a sound chime, acting as both basic test (screen, sound, led) and ensuring positive bootup.
- Bootloader start screen has a time-limited prompt to bump to “load mode”. Once in load, mode, the Arduboy stays there until rebooted. Easy to upload new sketch at that point.
- Sketch upload is driven by well documented (easy for Win/Linux/Mac) transfer of a .hex or equivalent file, meaning binary distribution is possible and a portable loader (possibly from host mode OTG phone) can be implemented.
- This bypasses offer of any USB capability unless user requests it, eliminating spurious driver load requests on host system.
- Try and keep bootloader under 1K, or at least under 2K.
- New bootloader can be loaded via a sketch, so as to not require special wiring or hardware, allowing deployed units to be easily upgraded.
That #6 is a concern. I am assuming that it is at least possible - but tricky - to update the bootloader without a programmer, but I am beginning to think that all of the techniques I see don’t actually skip using a programmer, they just skip using a dedicated programmer and find a different way to drive the ICSP connection. I was rather hoping that a dedicated sketch could be loaded that would contain the new bootloader, and then on command, cross write the bootloader from sketch area to actual bootloader area. But - still out of my depth to deal with that question.
I don’t think you’re going to solve this, for the general Arduboy owner population, with a new bootloader. There will be close to 10,000 Arduboys in the field with the base Leonardo bootloader. The majority of owners won’t have the capability, skills or desire to flash a new one just to overcome this problem.
I’m thinking it may be possible to have the sketch totally reinitialise the USB hardware with only the desired functionality. The bootloader might make the other functionality appear briefly but the sketch would make it disappear quickly. You’re going to have to research the Arduino USB driver code and likely get close to the “bare metal” to make this happen.
If you wish to continue discussion on this, please follow up by using the Reply as linked Topic link that appears at the right when you hover the mouse over a reply. Thanks.