Need Code for ESP32

2 years 2 months ago #5628 by Rotter
Need Code for ESP32 was created by Rotter
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,

Please Log in or Create an account to join the conversation.

2 years 2 months ago #5629 by Simomax
Replied by Simomax on topic Need Code for ESP32
Hi Ingo,

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:

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(; // RADMON.ORG IP, CHECK THIS
EthernetClient client;

Procedure to init

void init_ethernet()
// give the ethernet shield a second to initialize:
Ethernet.begin(mac, ip);

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.println(" HTTP/1.0");
{ // you didn't get a connection to the server: }

Please Log in or Create an account to join the conversation.

2 years 2 months ago #5630 by Rotter
Replied by Rotter on topic Need Code for ESP32
Thanks Simomax, I have seen this example. I was just thinking that there must be some code out there which does nearly what I wanna do. But if there isn't, I will try to figure it out with the example above.

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum
Solar powered Raspberry Pi 4 server stats: CPU 52% Memory 16% Swap 14% CPU temp=60.8'C Uptime 13 Days