Running Arduboy sketches on a UNO or other 328p based board

(Kristen Berry) #1

If I use this library, will It allow me to upload an arduboy game onto my arduino UNO? I know the regular library is designed for Leonardo but I’m in a pinch for a project and need to get this game on my uno for a show. Thanks so much :heart:

(Pharap) #2

It depends on your hardware setup.
If you have all the same screen and pinouts then it should work.
Otherwise you’ll have to create a modified version or try an existing modified version like @Mr.Blinky’s Arduino board package:

Again though, it depends on things like what your pin setup is, what kind of screen you’re using et cetera.

(Scott) #3

Sorry, I tried to move this discussion to this new topic but, due to not selecting the first two posts, I’m not having much success getting them in order. I’ll quote one of @Pharap’s responses, which I hope will suffice.

This topic can be used to continue the discussion.

(Felipe Manga) #4

Does it have to be an Arduboy game? It’d be easier to get a Gamebuino Classic game on an UNO.

(Scott R) #5

I did the reverse with Tamaguino the project was originally intended for 328p.


In fact, if you select the board “Arduino UNO” and try to compile for the board, it won’t do. The Arduino UNO was almost certainly capable of this, but I think the processor arranged in a way that it is impossible for it to do what we want it to do (the library). Rearranging how the library works shuold solve the problem. (HINT: One reason I do not like UNO)
I would prefer the Leonardo. I like how the slightly bigger processor looks on mine.

(Kristen Berry) #7

I thought of that too, I will look into and come back when I get the error code :rofl:

(Kristen Berry) #8

My Leonardo is coming in Thursday for the arduboy sketch. I’m very new to this so I’m not very confident I could go in and rerout the peripherals and all that jazz to make it compatible with the uno; for this project im just gonna use the tft shield I have and my uno and try to upload flappy bird and handbuild a console for that. So far the only error in the code compilation I am getting is one that has to do with adafruit gfx library, there is one line of code in it that says “RwReg mosipinimask, misopinimask, etc.” And I keeps saying that RwReg is not a type and idk how to fix it and make it a funtion instead? I am not savy to the lingo

(Pharap) #9

Which version of flappy bird are you planning to port?
Flappy Birdie, Flappy Ball or Flappy Halloween?

Whatever you decide to do there’s no way around having to edit some code for this.
You’ll either have to edit the Arduboy2 library to work with your system (probably more difficult, but also reusable) or edit the game in question to use the libraries suitable for your system (less difficult but has to be done once per game).

Pretty much nobody here will be able to tell you what your error message means without seeing the error message in full and possibly the code that goes with it.

(Kristen Berry) #10

Thank you, idk I’ve been frantically trying sketch after sketch on the uno and can’t seem to find any that are directly compatible. I got the Leonardo today, and 2.2" tftlcd from open smart. Hopefully I can get something on there before Sunday. I also have a Dfrobot input shield with the joystick and some buttons, it’s compatible with oleds and one of those is on the way now.

Do you know of any simple game codes that don’t require much edifying of the library? I got an edited version of the spfd5408 library for the touchscreen I have, I am going to attempt to run some arduboy sketch on the Leonardo later.

This is hurting my pride tbh I didn’t realize you had to rewrite so much code or I would have studied it more before I got this far along (never to late to learn and I have books on python and c++ it’s just needing someone to converse with in order to comprehend what I’m reading in a way that isn’t so stark).

(Pharap) #11

If you’ve got a leonardo then the things that means you don’t have to worry about CPU timers or assembly, but if the screen is a different type then you’ll still have a fair chunk of screen code to replace, and possibly the pinouts will be different (though they might be able to stay the same).

Depends how impressive the game needs to be and whether it has to be an Arduboy game or not.

Something simple like noughts and crosses could tweaked or thrown together quite quickly.

Yeah, it’s not like developing for desktop or phone, it’s not ‘plug and play’.

Python won’t really help you here, microPython can run on ARM chips but I don’t think AVR chips have enough memory in general.

C++ would be more useful, but generally it isn’t something you can learn overnight (or at least, not to the extent where you could dig into and modify a library to do what you’re aiming for).

Your best lifeline here would be to get some help from other people who would know how to modify the library, or to look for a game from a project that has a similar setup to what you’ve got so there’s less modification required.

Depending on what library your screen uses, it might be worth trying to find a simple game and swap out the Arduboy2 code to use that instead. That much you might manage on your own depending on how similar the library is.

Without knowing the end goal or the library that the screen uses I can only make general suggestions to be honest.
The more information you can provide, the easier it will be to find help.