$12 Arduboy compatible system


(John) #41

It works!


(Scott) #42

Excellent! Well done :checkered_flag:


(Szmozsánszky István) #43

Okay, so I just did my own Hackduboy :sweat_smile: (to test production device stuff & Arduboy Lib 1.0)* — and damn, it was super easy! :open_mouth:

(* well, 0.9.0 at the time of writing :smiley: )


(Kevin) #44

This is so cool to see people build the same circuit I did like 3 years ago over and over again on a breadboard :blush:


(Sean ) #45

Hey I have a problem and I want to see if you can help me. Instead of the pro micro, I aws given a arduino nano and that is what I have to work with. It has a slightly different pin-out and I have problems connecting it to my SPI OLED screen. On top of that the screen has a slightly different pin-out to the conventional SPI OLED as it’s pin-out is:
GND VCC SCL SDA RES and DC. I have tried to connect them following your schematic and with my limited knowledge, but its gotten to the point I just need help


(Scott) #46

@SeanO, Based on the pinout you’ve given for the display, it looks like it may be for I2C, not SPI. If this is the case, then it won’t work with the Arduboy library. Can you provide more info on the Display?

If it is an SPI display, you should connect it as follows:

Display  Nano Pin
  SCL      D13
  SDA      D11
  RES      D6 Kickstarter, D12 DevKit
  DC       D4  

The Arduino Nano is based on the ATmega168 or ATmega328, whereas the Arduboy is based on the ATmega32u4. You may encounter issues with the differences between the processors. If your Nano has an ATmega328 then you will have 2K of RAM instead of 2.5K, which may be a problem for some sketches. If you have a ATmega168 version, there will only be 1K of RAM and 16K of flash, which won’t be sufficient for an Arduboy compatible.


(Sean ) #47

Thanks for the reply! I have the arduino nano with the atmega 328 processor. With my screen I thought it was I^2C aswell, but the manufacturer says that it is compatible with both SPI and I^2C. It has the IC driver: (SSD1306).
The game I wanted to run off it was glove but I didn’t want to change the code in case I messed something up.


(Scott) #48

If the display can do both, then there will be a jumper or something to set the mode. Make sure the display is set for SPI. Also, if you’re not using level shifters, make sure the display is 5V tolerant.

Another problem you’ll have with using a Nano is that the Arduino pins are mapped to different internal ports and bits. Since the Arduboy library uses direct port reads to determine the button states, the buttonsState() function in the library will probably have to be reworked.


(Sean ) #49

Thanks for the help! With the pin-out I thought that would be it, but if it could do both, how could you tell it to read SPI? Also I had the screen running from the 3v3 regulator.

As for the arduino, I wouldn’t know how to change the maps of the pins as I am better with hardware electronics and new to coding, so I reluctantly might have to purchase a pro micro.


(Scott) #50

It can only be configured through hardware, so unless the display is hard-wired for SPI there should be a jumper or switch on the display to select between SPI or I2C.

And were you connecting the display signals directly to the Nano pins (which output 5V)?

That’s probably a good idea. It may turn out that there are more issues with using a Nano beyond those I’ve already mentioned. Also, instead of a Pro Micro, using an Arduino Micro or Leonardo offers the possibility of even better Arduboy compatibility.


(Sean ) #51

Thanks for the help I guess I’ll buy a micro then!


(Sean ) #52

If anyone finds out how to use the nano in this project, please share!


(Scott) #53

@SeanO, If you can get the library example HelloWorld sketch working with the Nano, I’ll try to modify the library to make the buttons work, and anything else if necessary, as best as possible.

Even the HelloWorld sketch won’t compile with the library “as is”, so if you want to try this, let me know and I’ll make you a custom library that will at least compile HelloWorld for the Nano.


(Sean ) #54

Thanks so much! That would be very helpful! :smiley:


(Scott) #55

@SeanO, I’ve made changes to the Arduboy library to support ATmega328p based Arduinos, such as the Nano, Uno and Pro Mini. This library code is on the atmega328p branch of my fork.

The code could use some cleaning up and there’s still more changes required but I’ve tested it with an Arduino Pro Mini. I’ve only tested the HelloWorld and Buttons sketches. I haven’t tried the speaker.

The pins used are close to the Arduboy Kickstarter version but some have changed, noted with an asterisk:

Display  Nano Pin
  SCL      D13*
  SDA      D11*
  RES      D2*
  DC       D4
  CS       A4* (if display has it)

Button   Nano Pin
  Up       A0
  Right    A1
  Left     A2
  Down     A3
  A        D7
  B        D8

Speaker  Nano Pin
   1       D5
   2       D3*

RGB LED  Nano Pin
  Blue     D9
  Red      D10
  Green    D6*

Using a Nano with a I2C oled
ArduBoy using an Arduino Nano?
Building an ArduBoy clone
[Discuss] Arduboy Quick Start Guide
Can any of the Arduboy games work on this watch? [Off-Topic]
(Sean ) #56

Thanks so much! You are so helpful! Especially since I’m new to arduboy and coding this will be really beneficial!


(Michael) #57

Can someone please tell me if i have the screen wired correctly to the arduino micro?
I am currently not getting anything but a black screen.


(Ross) #58

This is the nicest workspace I’ve ever seen… sheesh. It might be easier for people to comment if you give a wiring diagram or something, something with labels and pin labels alongside : ).


(Scott) #59

@shdwwzrd, It looks to me like you’ve got DC and RST reversed. The black wire DC should be going to Arduino Pin 4. The white wire RST should be going to Arduino Pin 6. All other connections look OK.


(Michael) #60

Works now, Thanks. Now I can test my code.