Is it possible to make an arduboy devkit with esp8266 based system.
Technically yes as the ESP8266 has a lot more memory and a fast processor than the 32u4 chip used in the ArduBoy. You may however have to modify the library to get it to work.
Is your question:
Could you add an ESP8266 to an Arduboy, as an additional componemt, to give it wireless capability?
Could you use an ESP8266 by itself to create an equivalent to an Arduboy, where the ESP8266’s processor interfaces to the display, buttons, speaker, etc., as well as providing Wifi capability?
The answer to question 1 is: Yes you could add an ESP8266 to the current Arduboy or DevKit, or a new prototype. This has already been discussed.
The answer to question 2 is: As @TheArduinoGuy said, the libraries would have to be modified to support the hardware differences between the current Arduboy and an ESP8266 based system. Another problem is that the ESP8266 only has about 10 I/O pins available. The Arduboy uses 16 pins for all its attached devices. However, if you were to play some tricks with the display and leave off the RGB LED, you may be able to control everything.
Multiple Arduboys talking to each other wirelessly would be pretty kick-butt.
The big question about ESP in this format, what is the power consumption? How long can you run one at 180mAh? The biggest issue I’ve seen is that theoretically these need significant power consumption for the radio, but I haven’t done any testing.
Presumably, when used with an Arduboy, an ESP8266 would be transmitting and receiving fairly often. From what I’ve read, an ESP8266 would average around 35mA to 50mA in these circumstances. The Arduboy itself draws about 25mA depending on how many pixels are lit on the display. So, the ESP8266 could draw twice as much as the rest of the Arduboy.
Let’s say the Arduboy draws 25mA and the ESP8266 draws 40mA. That’s 65mA total. A 180mAh battery would last roughly 2.75 hours.
I was thinking use the esp8266 as the main brain for the device and use a multiplexer or I/O expander to control more inputs. Like the PCF8574 as the ic is small and easy to control
I believe it’s 70mA (educ8s.tv) but don’t quote me I’m not 100% sure… (that was with a small tft LCD screen as well. Current is quite low when not using WiFi…)
That would be great!
Do you know anyone interested in doing it? Because I’d love to have it working on the esp12, but I’m struggling to make it compatible due to my lack of expertise… If anyone’s interested it’d be a cool thing to do for fun.
Ok… So i will make a github repo with the arduboy2 library to port it to this architecture. Also i want to make it compatible with the i2c version of the ssd1306 (the oled display) to reduce the pins requiered for the arduboy. Other people made this porting the Arduboy2 library to the arduino nano using the i2c version of the OLED.
I think that i can implement a fully functional clone only using the esp8266. Any help will be apreciated so much.
If you are trying to reduce pin count, a much better approach would probably be to use a parallel in/serial out shift register for the 6 buttons instead of trying to switch to an i2c oled display. There is a LOT of data that is transferred to the oled display for each screen update and i2c is quite a bit slower than SPI.
Tks serisman, i allready look for that, but i will try to make the port to the i2s dysplay because:
- the esp8266 is capable of getting this display to run at 1 Mhz using i2c giving framerates at 60 hz
*Using external hardware like a shift register will make the hardware more difficult to produce for the hombrew people. I have a CNC for pcb prototypes and thats not a problem for me, but i want to make this port very easy to make.
I allready start the port using a local copy of the arduboy2 lib.
TKS a lot for the recomendation
@serisman is right.
The speed isn’t limited by the MCU, it’s limited by how I2C works.
I2C’s highest speed grade is 3.2 megabits per second, whereas SPI regularly goes over 10 megabits per second.
I don’t know quite how fast the Arduboy’s SPI link goes, but it’s very possibly that it’s higher than I2C’s highest speed grade.
You sure about that?
According to the datasheet for the SSD1306 the clock cycle time for i2c is 2.5 uS, which is 400 kHz.
Even if we ignore the extra overhead that i2c requires for setting up the slave address and such, a full frame of display data will take at least 23.04 mS to pump out (9216 clock cycles = 128x8x9bits). That means your absolute best case is only 43 FPS (assuming you can keep the i2c hardware fed with data 100% of the time). It will be much lower in real life with other overhead I didn’t take into account here, and with letting the cpu run actual game logic. For comparison, SPI can send a whole frame in under 2 mS (if I recall properly).
Certainly feel free to play around, but also pay attention to what is theoretically realistic before digging in too far.
I disagree with this. If you are really worried about this, get a DIP version of the shift register or use a cheap SMD adapter. But, for me SOIC is actually easier to mill out with a homebrew CNC (no holes to drill) and is quite easy to solder using homebrew equipment.
You could also look into an i2c expander for the slower GPIO needs (i.e. button inputs and led outputs), which are cheap and can be bought already installed on an adapter board for under $1. Something like this would work well (MCP23017): https://www.aliexpress.com/item/p/32830799627.html
I am curious with what you come up with, but please be realistic. If you can’t get 60 FPS, you won’t match the frame rate that many games require and users may be dissatisfied.
Guys please check this:
I already make some progress using this library to draw some frames at very high rates.
Also check this out:
I know from this that is possible to do it witout using any external hardware.
for the last link watch this: is the library mentioned working:
The question was never whether the ESP8266 would support a higher i2c rate, but whether the oled display would work with a higher rate. According to the display’s datasheet the brzo library would be substantially ‘overclocking’ the display, but I guess if it works, it works!
By the way, you don’t have to try and convince me one way or the other, and I am genuinely interested in what you come up with. I just wanted to make sure you can make an informed decision before you go too far down a path and end up spending a bunch of time on something that might not work out as well as you want. But, it looks like you are off to the races. Have fun, learn something new, and build something cool!
That link for the ESP8266 Arduboy is pretty neat, especially with the loader menu to switch between different games. Too bad the user didn’t share any of their code changes, or schematics, or anything else useful (other than pictures) for someone to more easily replicate it.
So i made some progress to the lib, now im capable of running the the most of the arduboy2 library examples, todo:
*implement the eeprom functions
*Implement the button functions
*Implement the sound function
All the oled functions for i2c seems to work very well
*Implement the EEPROM functions
*Implement the sound