I am trying to compile the ESPboy_FirstTest using ArduinoIDE. I’ve installed the board, selected the “WeMos D1 R1” board and installed the libraries needed for the project. Now when compiling I get
ESPboyInit.cpp 22: call of overloaded 'begin(int)' is ambiguous
I suppose it’s maybe because the library was updated and the constructors changed. It would be good to fix the example. Or maybe I’m just doing something wrong
You can fix the compile error by changing the line in ESPboyInit.h from: #define MCP23017address 0
to constexpr uint8_t MCP23017address = 0;
But then you get a white screen. Buttons still seem to work.
@RomanS said on Discord:
LCD’s chip select PIN is driven also by MCP23017. you can see in setup ESPboyInit #define CSTFTPIN 8
and mcp.pinMode(CSTFTPIN, OUTPUT); mcp.digitalWrite(CSTFTPIN, LOW);
the problem is somewhere there i think
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? 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:
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 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.
Just changing #define MCP23017address 0
to constexpr uint8_t MCP23017address = 0;
worked for me with the latest Adafruit MCP23017 Arduino Library (v1.2.0).
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…) ?
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
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.
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 @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