ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 18
VIEWS: 91
BACK
REPLY TO THIS POST
Swapfile
21 Jan 2025
Got Platformio working build and program but board does nothing.
Hi

I manage to get Platformio setup with the ChipChop dev console.

Build and download successfull.

But the Blue led on the board does not flash as it is supposed to when connected to the WiFi.

The board does nothing , except the power led is on.

I selected the ESP32 DEV board in the ChipChop console but my board is a ESP32 Wroom 32 DA.

Please help I am 99% there just some small bump in the road.


Swapfile
21 Jan 2025

Forgot to post the screenshot


Attached images
Gizmo
21 Jan 2025

Awesome! We are almost there

Ok, rather than me guessing and writing tons of posts can you just zip the entire folder with your code and email it to me and I’ll load it up on my wroom (just use the address from the welcome email you’ve received hello@…)
Or post the main.cpp code here but remove your account credentials

The board model is not an issue, if it was wrong you wouldn’t be able to upload the code at all.

It’s probably just needs a tiny tweak in the code.

By the way, what is the led pin number on your board?

Oh and did you try pressing the serial monitor button to see if you get any messages?
Swapfile
22 Jan 2025

Check email for Zip file.

led switch pin is 23.

The blue onboard -pin2- led does not flash.

No I did not check the serial monitor , I can't even find it.
Gizmo
22 Jan 2025

Howdy,

Ok, I've checked the code and it's working absolutely fine!?

Silly question but have you actually entered your wifi connection details (or have you entered them correctly)?
It's the line 62


WiFi.begin("< SSID name >", "< password >");


should be something like (don't leave the "< >" inside

WiFi.begin("somessidname", "somepassword");


I've missed that myself many times and then wandered why I'm not getting connected :-)

Second, I am not sure what you mean by "blue led not flashing", the blue (built-in) led is for you to use and I never had one that would flash when connecting to WiFi, it's something that you would normally do yourself in the code if you wanted.
For example I have a bunch of motion sensors where I make the blue led blink if motion is detected and it would piss me off if the chip was messing with that because it decided to connect to wifi.

Anyways, here is what I suggest, priority is to get the esp to connect and start communicating with ChipChop so check the wifi credentials and fire up the serial monitor (here is a picture where it lives)



If you get in the serial monitor messages (it may take some time) like {"api_call":"heartbeat","command":"heartbeat",......} and {"status":"ok","timestamp":.......} then we are good, go to the Dev Console > Live Control and you should see your device online and you can click on it and control the led

If you get a message like: ChipChop => Connection closed. Don't panic, we'll try again in xx seconds that's fine but if it keeps repeating more than 2-3 times then it's a wifi issue.

What is the exact name/model/manufacturer of your board? I know that the chip is ESP32 Wroom DA but I don't know if there is something specific to the board itself and how it's wired up so it may be worth me having a look.
I think the Wroom DA is marked by Espressif as "End of life" chip

Let me know how it goes, it has to bloody work!





Attached images
Swapfile
22 Jan 2025

Thanks a lot.

I did a test with Platformio and created Blink program that works on the ESP32 Wroom using the ESP32DEV Board selection.

Yes I did put in the WiFi details but the <> I left it there.

I think I left the <> in the previous working test files and it work but I will remove that and test.
Gizmo
22 Jan 2025

cool, just open the serial monitor as it will show what is going on
Swapfile
22 Jan 2025

I just check in the Aduino platform there is no <> thats why I did not notice it.

Ok , let me try to explain.

A few posts back you send me a test file for Arduino .. Smart_Led , when I load this into my ESP the Blue led flickers as if data is running through it.

I did not make any changes to the file.

The same as a Data router or Internet port , that little led flashes on/off at different speeds as if it mimics "1" and "0".

When there is no wifi connection the blue led will stay on.

Then:::

I also tested my ESP32 on Arduino cloud and switch between 2 wifi's , when connected the blue led flashes when I move to the other wifi , the blue led stays on until I change the wifi password and name.

Now>>>
The code that I send you in the mail, the blue led never switches on ,

I will change the wifi settings now and remove the <>.

Thanks a lot for your help.
Swapfile
22 Jan 2025

NO wifi connection but the wifi name and passw is correct and the <> removed.

Let me investigate a bit.


Attached images
Gizmo
22 Jan 2025

What do you mean, you have successfully connected!!!

You've got the messages:

ChipChop => Socket connected
and
{"status":"Howdy Partner"} <<< this means everything is working

The error "Can not connect to WiFi...dns failed...etc" is coming from the websockets trying to establish a connection before the wifi is fully connected but they do try every few seconds and obviously it goes through once the wifi has stabilised

The blue led has nothing to do with the wifi, I guarantee you that, it's just a fluke and probably the case that in the code I've sent I've used the pin 2 to test the led and was probably set to HIGH which fired it up

That's it dude, just plug the esp again and let it run and observe the serial monitor and the LIve Control in the Dev Console

I can't track it at my end unless you give me the access key but it doesn't matter after seeing that last screenshot I know it's all working

Keep me posted

Swapfile
22 Jan 2025

Yes , sorry it keep on scrolling lines that said connection failed at the time I took the screen shot there was a connection that I did not see.

I re- power the ESP a few times and took me some time to notice the WiFi did connect.

Gizmo
22 Jan 2025

ok, so is it showing in the Live Control as online and with the led status?
Swapfile
22 Jan 2025

Yes live Control shows green Online.

Live Control in the right hand plane I can toggle the led on/off.

Also from my phone I can switch the led on/off.

Thanks a lot.

How do I share the my.chipchop.io app to my phone , to get a desktop icon? watsapp / email?

From what/ where in the libraries do you print "connecting" and "connection fail"
Gizmo
22 Jan 2025

Finally!!!

To get the app on the phone

1. use the phone's browser (best is to use Chrome) and go to https://my.chipchop.io (make sure it's https:// not plain http://

2. don't login yet

3. on Android in Chrome > top 3 vertical dots in the top menu > Add to home screen and then "Install"
    - you may have to wait few seconds but should get a prompt that the app is installed and it should appear on your phone's home screen somewhere

4. launch the app from the home screen and login

That's it

on iOS it's same thing but you use the "Share" button and then Add to home screen



The various ChipChop messages are automatic and not all are coming from the ChipChop library and I don't have control over all of them, the ChipChop stuff can be enabled/disabled in the void setup()
it's the ChipChop.debug(true); or ChipChop.debug(false);

There is a library property that you can check wherever you want ChipChop.connected (no brackets at the end), it has a value of 1 or 0


This version of the code builder library does have 2 event hooks that are emitted but they are mostly used internally, if you want then this is how you can use them in your code.




void socketClosed(String a, String b, String c, String d){
    
    //do something here if the ChipChop socket get's closed for some reason
    //note the a,b,c,d arguments will have no value but need to be declared
}

void socketConnected(String a, String b, String c, String d){

    //do something here when your device is successfully connected

}

void setup(){

    .... stuff here

    ChipChop.addListener(CC_SOCKET_CLOSED, socketClosed);
    ChipChop.addListener(CC_CONNECTED, socketConnected);

}





p.s. This whole saga with the Arduino IDE forced me to do what I didn't want to do so I have released a new "temporary" version of the library 1.43 that doesn't use websockets and should be able to run within all the crap of Arduino IDE. This is just a temporary measure as I have vs. 2.x in Beta phase but it won't be ready for few months.
This doesn't affect you in any way and even when the new vs 2.x is released it will be fully backward compatible with all the code
Swapfile
22 Jan 2025

While I was in my.chipchop.io on my phone a message pop up that said "Install chipchop app" so I clicked on that and now have a APP on my phone.

Maybe you must just DUMP the Arduino platform to many problems.
Gizmo
22 Jan 2025

ha ha, yeah, the biggest problem is the Arduino IDE app itself and the compiler inside.

Arduino as a programming framework that sits on top of c++ and between the micro-controller's core code is kinda necessary, it would be impossible to cover so many different devices with one code base.

I was tempted to only focus on ESP but there are some other interesting micro-controllers around that people want to use and Arduino helps by acting as a translator.

To be honest, it was never my intention to release anything code related, the original ChipChop had just a communication API and it was up to you to write a library to connect to it but over the years people kept asking for more and more so now I also have to manage and maintain not just a bunch of servers on different continents but also the frigging micro-libraries for two different compilers :-)


So...now that you've mastered the Smart Led, next job is a Smart Button and then I wan't to see at least a small robot that can do a TikTok dance...deal 😁

Keep me posted on your progress, and shout if you get stuck, I'm here
Swapfile
22 Jan 2025

Yes I want to add more functions and will slowly gro.

Do the small robot first then the robot can make the Smart switch.....ha ha ha.

What is your gmt time zone?
Gizmo
22 Jan 2025

lol...that's exactly how I do things!!!

I'm in the UK so currently I think 2 hours behind you, you in SA, ZW...?
Swapfile
22 Jan 2025

SA , 300KM East of Johanesburg.