Need Code for ESP32
first, I searched the forum and the web but did not found what I'm looking for....
I have the Geiger Kit from Bang... and connected it to a ESP32 TTGO with with Display.
I made some code to show the measurement on the display and send it via WiFi to my RPI (Mosquitto running).
Now I want to upload the Data to Radmon as well.
My problem is the connection. Can I "open a second WiFi connection" for Radmon (The one for my local net should stay established).
Can anybody provide some code snippest, please?
Thanks in advance,
Ingo
Please Log in or Create an account to join the conversation.
Welcome!
I'm not sure that there is any ESP32 code for Radmon, however there is some arduino code that may work as a starting point for you. Look on the software page and scroll down to the 'arduino' section: https://radmon.org/index.php/software
If you have already got your ESP32 work with your counter and display the current CPM then you are almost there. All that Radmon requires is for the current username/password and CPM value to be sent so you may need to either write new code to do so, or edit the arduino code to suit the libraries you are using on your ESP32.
This is the arduino code from the 'software' page:
#include <SPI.h>
#include <Ethernet.h>
Arrays and object definitions
byte mac[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }; // MAC ADDRESS OF YOUR ETHERNET ADAPTOR
IPAddress ip(192,168,0,5); // YOUR IP
IPAddress server(80.229.27.195); // RADMON.ORG IP, CHECK THIS
EthernetClient client;
Procedure to init
void init_ethernet()
{
// give the ethernet shield a second to initialize:
delay(1000);
Ethernet.begin(mac, ip);
delay(1000);
}
Procedure to send CPM value to radmon
void connect()
{
if (client.connect(server, 80))
{
client.print("GET /radmon.php?function=submit&user=");
client.print(UserName); client.print("&password=");
client.print(PassWord); client.print("&value=");
client.print(int(f_value[CPM]));
client.print("&unit=CPM");
client.println(" HTTP/1.0");
client.println("HOST: radmon.org");
client.println();
}
else
{ // you didn't get a connection to the server: }
}
Please Log in or Create an account to join the conversation.
Thanks
Please Log in or Create an account to join the conversation.