New Gamepad Code Release V2r1a

76 views
Skip to first unread message

Steve Pendergrast

unread,
Dec 5, 2018, 3:20:17 PM12/5/18
to Vorpal Robotics Forum
Hello,

A new version of the gamepad code was released today. It's posted on github and also in the download area here:


The main improvement is the ability to format an SD card right inside the gamepad.

Who Should Upgrade?
You should upgrade if you use the Record/play gamepad feature or the scratch recording feature, as this makes it easier to recover from SD card issues.

Why Do I Need This?
The SD card can sometimes become corrupt, for example if you are in RECORD mode on the gamepad and remove the SD card, or even if you shut the gamepad off while recording or playing a recording, or if the battery dies while recording or playing. These situations can leave the SD card in an unusable state. Also SD cards just plain go bad sometimes for no apparent reason.

You used to have to take the sd card out, take it to a PC or Mac or linux computer with a card reader attached, reformat it, and put it back in the gamepad to make it work again.

With the new version of gamepad code, you can now format the SD card right inside the gamepad as follows:

1. Turn off the gamepad.
2. Hold down R4 (ERASE) and while holding it, boot the gamepad by turning it on.
3. Continue to hold for at least 10 seconds, or until you hear a high pitched squeal from the robot.

Limitations:  The gamepad always formats using FAT16 which is the preferred format for arduino SD cards. However, that means you can't format a card larger than 2gb with the gamepad. If you try, the gamepad won't even attempt to format it. Cards that large are not really useful in the gamepad anyway, as even a 64 mb card has enough space to store over a hundred hours of robot movements. Since the robot battery only lasts two hours, you'd never be able to effectively use more than a fraction of a huge SD card.

Note: All of the SD cards that come with our kits are 256 MB or smaller, so all the ones we sell will work.

Another reason this is nice is that it will use FAT16 even on small cards (under 64MB) that often come from the factory formatted as Fat12.  Fat12 is not supported by the Arduino SD libraries. So, if you have a card you bought that's 64mb or less and doesn't work, formatting with the new gamepad format feature very well could fix it.

Compiling the Code
You do need to load one more library into your Arduino system to compile this, the SDFat libraryThis library is currently under the LIBRARIES folder of the shared files: http://tinyurl.com/VorpalFiles

Important Note: Arduino IDE Release 1.8.7 has changed the option you need to use to upload to the nanos we use. Please select the TOOLS/PROCESSOR menu and make sure it's set to AtMega328p (Old Bootloader)  This just changed very recently.

Attribution
Our SD card formatting feature was derived from the SDFat formatter written by Bill Greisman. It is licensed under an MIT open source license. Complete attribution is in the code, near the top of the file, in a comment.


Reply all
Reply to author
Forward
0 new messages