$12 Arduboy compatible system


#9

Tried to make a sytem myself, but in the software I get this when I try to compile something from the standard Arduboy-master:

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Mac OS X), Board: "Arduino Leonardo"
In file included from ArduBreakout.ino:13:
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:100: error: ISO C++ forbids initialization of member ‘cursor_x’
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:100: error: making ‘cursor_x’ static
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:100: error: ISO C++ forbids in-class initialization of non-const static member ‘cursor_x’
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:101: error: ISO C++ forbids initialization of member ‘cursor_y’
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:101: error: making ‘cursor_y’ static
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:101: error: ISO C++ forbids in-class initialization of non-const static member ‘cursor_y’
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:102: error: ISO C++ forbids initialization of member ‘textsize’
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:102: error: making ‘textsize’ static
/Users/DHELL/Documents/Arduino/libraries/Arduboy-master/Arduboy.h:102: error: ISO C++ forbids in-class initialization of non-const static member ‘textsize’

I’m a beginner, but just can’t wait to play some games!!! Just to get this testboard going would be nice.


#10

I tried to compile ArduBreakout using the 1.0.6 version of Arduino that you used and it indeed produces these errors. Updating to the latest version of the Arduino IDE (currently 1.6.5) should make these errors go away.

Note : if compiling and uploading works but the screen stays black, carefully check all the connections to the screen, especially the RST signal. You can change the pins of CS, DC and RST in Arduboy.h. D0 is SCLK (pin 15) and D1 is MOSI (pin 16).


(Ross) #11

This topic is now a banner. It will appear at the top of every page until it is dismissed by the user.


(Kevin) #12

This topic is no longer a banner. It will no longer appear at the top of every page.


(Tim McMahon) #13

Did you notice that the price from ebay sellers for the SSD1306 0.96" 128x64 SPI OLED display jumped from $3.80 to $10.56 shortly after June 2015?

Luckily I purchased one on the 10th of June for $3.96 :slight_smile:


(Scott) #14

Since it looks like the production Arduboy is going to run at 16MHz, I’ve replaced the 3.3V 8MHz Pro Micro with a 5V 16MHz Arduino/Genuino Micro clone.

I switched from a Pro Micro to an Arduino Micro to get the extra I/O pins needed for better hardware and software compatibility. It has an on board reset button, so an external one is no longer needed, and since @bateske has decided not to include a Start button, now only the lower A and B buttons of the 4 on the right are used.

Because the display I’m using can’t handle 5V signals, I’ve also added a 5V to 3.3V level shifter module. Another benefit of the Arduino Micro is that it provides a 3.3V output for the level shifters (and display, if necessary, though mine has an on board regulator).

Once the wiring of the new RGB LED is known, I’ll add one as well. When the I/O pin assignments for the buttons and speaker have been finalised and disclosed, I’ll rewire mine accordingly, and then probably mount everything permanently on a circuit board.

I’m now using four AAA size NiMH rechargeable batteries for power. Their total output voltage will vary between 5.5V and 4.5V (if not discharged too far), which is within specifications for the processor running at 16MHz, so I’m just feeding the battery output straight into Vcc, without regulation. With the 800mAh Eneloop batteries I’m using, I should get at least 14 hours of operation per charge. For 1.5V non-rechargeable batteries, or other higher voltage supply, you could probably use the Micro’s on board 5V regulator.

Switching the processor board ($2.90 more) and adding level shifters ($1.00) has increased the cost somewhat, so my $12 system is now more like $16. Also, as @TimMcMahon pointed out, the cost of the displays has increased significantly, so today’s price would be more like $23.


Star Honor - A Space Roguelike Adventure
Multi-player linked Arduboys via a USB host (PC)
Help With Building Arduboy/Devkit Clone (Blackstripe)
How to Reset the Dev Kit
My personal homemade arduboy
Amplifier Circuit
drawPlusMask artifacts, frequent bricking after upload
Arduboy 2 My Ultimate Hardware Wishlist
(Kevin) #15

There is a shortage of displays right now, I was lucky to get in just before it got really bad. And also very lucky the quantity was so high, because it ended up being the minimum order quantity for the only place that could get them any faster than 6 months!

This is part of the reason the kickstarter units are behind schedule, we should get all of them delivered to us by the end of the year.

I’m looking into ways to sell the parts on the store here, but it only makes sense to me if I can sell them cheaper than they are available elsewhere. I’m looking at ways of selling the battery separate but that is a project for another day.

Don’t forget the original board files are out there too!


(Kevin) #63

I just wanted to jump in here and say I love to see all this work here, it’s so cool to see everyone helping each other out. These kind of forum posts are exactly how I got started. Keep it up everyone!


(Raphael) #76

Hello everyone!

I’ve recently ordered my Arduboy from the webstore and I think I’m gonna get it in my hands soon enough. But since I always love cool projects, for as simple as they may be, I bought everything necessary to build my own homemade Arduboy, or “Hackduboy” as some have said. :slight_smile:

I know a bit about electronics and programming, but have never messed with any Arduino related thing.

So, I’ve got an Arduino Leonardo, this OLED https://cdn-shop.adafruit.com/1200x900/938-15.jpg, a piezo speaker and buttons.

I want it to be as compatible as the production Arduboy, but I’m not so sure of how to connect everything, and I’m afraid I can damage something if I do it wrong.

Can someone help me, please? :grin:


(Scott) #78

To be fully compatible you would also need a common anode RGB LED and three suitable dropping resistors for it.

Wiring for an Arduboy compatible using an Arduino Leonardo and Adafruit 938 (or 326) OLED display:

Some of the display pins need to be connected to the Leonardo’s ICSP header, which is the 3x2 pin connector on the edge opposite from the power and USB connectors.

Display Leonardo
Data ICSP 4 MOSI
Clk ICSP 3 SCK
DC 4
Rst ~6
CS 12
3v3 (not connected)
Vin 5V or ICSP 2 VCC
Gnd GND or ICSP 6 GND

Either speaker lead can go to either pin. If the volume is too high, you can put a resistor between one of the speaker leads and the Leonardo pin.

Speaker Leonardo
Lead 1 ~5
Lead 2 ~13

One side of each button goes to GND. The other side of each button goes to:

Button Leonardo
Up A0
Right A1
Left A2
Down A3
A 7
B 8

The common anode of the RGB LED goes to 5V.
The cathode of each individual RGB LED should connect to its own appropriate dropping resistor. The other lead of the resistor should go to:

LED resistor Leonardo
Blue ~9
Red ~10
Green ~11

For the RGB LED that I used, similar to this one, I found the following resistor values to work well with regulated 5V power: Red 1K, Green 3.3K, Blue 1K


First time programmer, DIY arduboy
(Raphael) #79

Thank you very very much, man! It all works perfectly well!

Now that I’ve tested it using a breadboard, I’m gonna make a box or something of the kind for handling it better.

If anyone’s interested, I’ll post some pictures of what I’ve done when I’m finished.


(Mike McRoberts) #97

ArduBoy uses 16 pins? I made a clone of an ArduBoy and it is using 12 pins.


(Scott) #98

Buttons: 6
Display: 5
Speaker: 2
RGB LED: 3

Tricks with the display: Tie CS low and use an RC circuit for reset to eliminate 2 pins.
This still means 14 pins.

If you want to remove some functionality: Use only 1 pin for the speaker. Eliminate the RGB LED.


(Mike) #101

Well, my dev box is running memory tests :frowning:, so I decided to take a crack at putting one of these together. The parts box provided everything but sufficient switches, so tried one of these instead. It worked well enough to verify functionality, but the buttons were problematical at best, the LEDs had the wrong common pin, and the entire thing was a bit flakey. Since I Need more switches anyway, I’ve placed an order for those. Thanks to those who contribute the writeup.

I’d really rather use a Uno than a Leonardo, but the code doesn’t compile and I think it’ sufficiently unlikely that the leonardo version will work to bother trying it. Please let me know if that’s wrong. The Arduboy2 library doesn’t seem to be any better off. At one point Scott had a branch of the Arduboy library for the atmega328p, but the examples in that don’t build for me.

So, is the idea of moving from the Leonardo to a Uno dead? My next choice would be a pro mini (I buy those in six-packs), but that’s still got a 328 and not a 32u4, so probably no better.


(Scott) #102

I haven’t done any work whatsoever to make Arduboy2 328p compatible. Even the work I did on the original Arduboy library was incomplete.

An Arduboy equivalent based on a 328 instead of a 32u4 is always going to be problematic. There are too many hardware differences between the chips.

You can get close with the 32u4 based SparkFun Pro Micro but either a Leonardo or an Arduino Micro are the best for 100% compatibility with all sketches.


(Josh Goebel) #103

Yeah and I think overall the library (and others also) is moving the opposite direction of that also. We’re moving to smaller code size and very optimized for real Arduboy hardware (timers, ports, etc). Someone who wants the best experience really needs to use the same components - which as mlxxxp said is the 32u4 when it comes to CPU.


(Mike) #104

For me, this isn’t about “best experience”, but about “easier development”. I’ve got one 32u4 based Arduino, and something like a dozen 328p based ones in my parts box.

What I’m thinking about now is turning a proto shield into an “Arduboy shield”. Just solder the LCD, buttons and speaker on the thing, and then plug it into whatever fits my project best. The Leonardo for current Arduboy code, but it could go on a Mega or a Zero for a SAMBoy, or a Nuecleo board or even the STM32F469 Discovery if there’s ever an STMBoy. Anyone else interested in such a project?


(Scott) #105

Do you mean a project to create a standard “Arduboy” shield? It might be difficult because it’s best to assign pins based on the capabilities of the particular processor. E.g. PWM pins for the RGB LED or a DAC output for the speaker.


(Mike) #106

Clearly, it wouldn’t be “standard”, since there’s not really a standard. The devkit used different pins, and a number of systems similar to the one proposed here used different pins as well. Making it use the same pins as the current production Arduboy is more a matter of “why not” than “why”.

This would be in the same space as all those other DIY systems. The only real difference is being on a shield would make it easier to experiment with other processors than being on a breadboard or a custom PCB.


(Scott) #107

Sure. If you just brought out all the peripheral signals to pads, that could then be jumpered to pads on all the pins (either by soldering or by some kind of plug/socket system), and made it both 5V and 3.3V compatible, it could be useful.