Error compiling ESPboy_FirstTest

Thank you very much for help. I don’t use Discord and my ESPboy hasn’t arrived yet, so I can’t test this.

3 Likes

Please note, that

here the list of libs all the software was tested https://github.com/ESPboy-edu/ESPboy_ArduinoIDE_Libraries

i have to find time to solve this MCP begin() problem with upated MCP23017 lib.
Someday i’ll do it )

3 Likes

Also I am having trouble now with uploading to ESPboy: it is not showing under tools->ports in Arduino IDE. I can’t even see a connected device with lsblk. How does the uploading work exactly? Am I supposed to connect it to USB and then turn it on?

EDIT: hmmm, I can see there is another USB port inside ESPboy, what’s that for? :open_mouth: Am I supposed to use it instead of the side one?

The side port is only for charging the battery or powering the unit via USB. For programming, you have to use the port on the LOLIN D1 mini, inside the completed unit.

That is, unless you modify your ESPboy to connect the USB data lines to the side port, like I did:

1 Like

The cable doesn’t fit due to buttons :anguished:

Yes, there have been a few complaints about that. It wasn’t a problem for me, since I put my D1 mini in a socket and it ended up higher than normal.

Any idea about a solution? I tried to cut the edges of a USB cable but ended up destroying it :expressionless:

Yes, the position isn’t good, buttons should be more left to let plug the cable. Me i can plug my usb cable as the plug is smaller (thinner) but it’s touch the left button anyway and button didn’t come back to the normal. I have ask same to Roman. I hope it’s will be one of the things modified for Espboy 2.
(I have had my USB cable with the ESPBoy but i have other who could be too large too)

I can’t plug it in. I was able to just barely push in the cable that I cut, but the cable then broke because it had no insulation on it and stuff to hold it together, it fell apart.

Okay guys, I’ve taken another cable and managed to carve it so that it somehow fits :sweat_smile: It’s not perfect, but I’ll be able to program it.

Now to the example, I am getting the white screen. I don’t know what’s going on in the source, would appreciate ideas for a fix. Or could you give me some other “hello world” program just to get me started? I can work it out from there.

I think you have to customise the User_Setup.h file in the TFT_eSPI library. Maybe @RomanS can explain the details about this?

Edit: To get it working quickly, I just overwrote User_Setup.h with the version from here, but following one of the methods given in the TFT_eSPI documentation would probably be a better approach.

2 Likes

Just changing
#define MCP23017address 0
to
constexpr uint8_t MCP23017address = 0;
worked for me with the latest Adafruit MCP23017 Arduino Library (v1.2.0).

1 Like

I thought that a tuto was done about it. I know there is a little help on Github, but it’s could be cool to make a good tuto for new users. @drummyfish you think you could write the step you done to configure how to program the ESP (and how you done for plug it without the cutting cable part…) ?

1 Like

Access to USB for uploading firmware is not good but it will be fixed in ESPboy2.
Here it’s necessary to use a thin jack USB cable.

As MLXXXp mentioned, the problem with white screen is due to User_Setup.h file in the installed TFT_eSPI library . Use lib version from here to fix white screen problem.

Take into account that it’s better to set 160mhz MCU speed before compilation for heavy calculations games :wink:

1 Like

Thanks everyone, I just came from work and will get to programming soon, will check out your suggestions.

Yes, once I have everything in place and set up, I’ll document it.

I don’t know if it’s specifically my ESPboy, but I really couldn’t fit any cable I had at home, and looking online I couldn’t find many other shapes, it would be good to fix this as to not discourage people from programming – I think the mod mentioned above that allows programming via the side USB is ideal.

2 Likes

Sooo I’ve copied the libraries to my Arduino library folder, now it compiles, uploads and shows the FPS etc. – great! However, button presses don’t show. Am going to investigate.

EDIT: Playing tones also seems to not work (but it’s not a HW issue as I tested buttons and speaker with LGE previously, it’s something in the libs).

EDIT 2: So I figured out the keys, but it’s weird. The keys started to work when I removed all LED code (myLED.begin(), myLED.setRGB(), …) from the example. Then however the buttons sometimes kept stopping to work and I found that it was similarly caused by the tone functions (playTone(), …). When I removed even these, the keys started to work perfectly. So the LED and sound functions somehow mess up and break the buttons too. Why? Also, I’d like to have a proper fix, because I want to use sound :slight_smile: @RomanS, any idea why I am getting these issues?

hmm… try to use old MCP23017 lib and fully charge the device itself?

EDIT i’m out till 10 of Jan in the place with a very poor internet so can’t answer in details for a while
but i can’t imagine now the reason why this mess takes place (
i have to check all after 10 Jan

That’s okay, I’ll try to investigate myself in the meantime :slight_smile: I’ll try it on my desktop with a fresh Arduino environment, there is a tiny possibility that I’ve edited some Arduino files on my laptop and have broken something.

2 Likes

Great, at the moment, i use EspLGE but as soon as all will be ok for you and that you’ll have writte how you done, i’ll test to programm Espboy from Arduino IDE too. I have to compare results. I like the EspLGE system but i have to test what i can do with it and i’ll have to test all this great hardware add-on.

1 Like

Hmmm it doesn’t work on another computer either, will be testing it further. BTW is there any way for me to upload some already compiled binary to test the HW is still ok?