# Display over air

**URL:** https://forum.sensor.community/t/display-over-air/1282
**Category:** Feature Requests
**Created:** [March 10, 2022, 11:00am UTC](https://forum.sensor.community/t/display-over-air/1282 "2022-03-10T11:00:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [March 10, 2022, 11:00am UTC](https://forum.sensor.community/t/display-over-air/1282/1 "2022-03-10T11:00:09Z")

</div>

Hi there,

is anyway a project tah will integrate oled siplay and adition gateway (ESP8266), to show data from one or more sensors over air, not with cables.  
Something like this

 ![grafik](https://forum.sensor.community/uploads/default/original/1X/51a74232e5fe67bd7b1b0eda9f44b34fdd817769.jpeg)

Thanks

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [March 10, 2022, 2:02pm UTC](https://forum.sensor.community/t/display-over-air/1282/2 "2022-03-10T14:02:34Z")

</div>

[https://github.com/pjgueno/SCClock](https://github.com/pjgueno/SCClock)

It does exactly what you want. You can easily supply it with an 18650 accu.

It should not be that complicated to add a screen.

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [March 10, 2022, 2:10pm UTC](https://forum.sensor.community/t/display-over-air/1282/3 "2022-03-10T14:10:16Z")

</div>

Thanks, just addin the screen is not a problem.  
But I have to seat down and play a little bit with code.

But I think that so one comunnity really need it.

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [March 10, 2022, 4:53pm UTC](https://forum.sensor.community/t/display-over-air/1282/4 "2022-03-10T16:53:24Z")

</div>

You can copy the SSD1306 part from the code in the main firmware.  
I can help you.  
You can fork and PR in GitHub if you want.

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [March 11, 2022, 1:07pm UTC](https://forum.sensor.community/t/display-over-air/1282/5 "2022-03-11T13:07:28Z")

</div>

Thats very nice from U, where to copy?  
Also it will be nice to have support for biger 2,4" screen, that can be somethinl like “official” Comunity sensor wheter station projekt start.

Thanx

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [March 11, 2022, 2:49pm UTC](https://forum.sensor.community/t/display-over-air/1282/6 "2022-03-11T14:49:13Z")

</div>

The screen on the picture is a generic OLED screen which is already used by the firmware (with I2C which is quite good). If you want a TFT 2.4" screen it would be much more complicated.

> <https://github.com/opendata-stuttgart/sensors-software/blob/master/airrohr-firmware/airrohr-firmware.ino>

Check lines 511 and 3533 for example.  
Can you code a bit ?

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [March 12, 2022, 10:43am UTC](https://forum.sensor.community/t/display-over-air/1282/7 "2022-03-12T10:43:30Z")

</div>

Thx, I can code some Basics.  
I just create simple script but I was unable to get data from server.  
I just want to start with some simple.

```auto
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h> // http web access library
#include <ArduinoJson.h> // JSON decoding library
// Libraries for SSD1306 OLED display
#include <Wire.h> // include wire library (for I2C devices such as the SSD1306 display)
#include <Adafruit_GFX.h> // include Adafruit graphics library
#include <Adafruit_SSD1306.h> // include Adafruit SSD1306 OLED display driver
 
#define OLED_RESET 5 // define SSD1306 OLED reset at ESP8266 GPIO5 (NodeMCU D1)
Adafruit_SSD1306 display(OLED_RESET);
 
// set Wi-Fi SSID and password
const char *ssid = "";
const char *password = "";
 
void setup(void)
{
Serial.begin(9600);
delay(1000);
 
Wire.begin(4, 0); // set I2C pins [SDA = GPIO4 (D2), SCL = GPIO0 (D3)], default clock is 100kHz
 
// by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
// init done
 
Wire.setClock(400000L); // set I2C clock to 400kHz
 
display.clearDisplay(); // clear the display buffer
display.setTextColor(WHITE, BLACK);
display.setTextSize(1);
display.setCursor(0, 0);
display.println(" Internet Weather");
display.print(" Station - Jaipur");
Serial.println(" Internet Weather");
Serial.print(" Station - Jaipur");
display.display();
 
WiFi.begin(ssid, password);
 
Serial.print("Spajanje na WIFI\n");
Serial.println(ssid);
display.setCursor(0, 24);
display.println("Spajanje...");
display.display();
while ( WiFi.status() != WL_CONNECTED )
{
delay(500);
Serial.print(".");
}
Serial.println("spojeno");
display.print("spojeno");
display.display();
delay(1000);
 
}
 
void loop()
{
if (WiFi.status() == WL_CONNECTED) //Check WiFi connection status
{
HTTPClient http; //Declare an object of class HTTPClient
 
// specify request destination
http.begin("data.sensor.community/airrohr/v1/sensor/70977/");
const int httpsPort = 443;
 
int httpCode = http.GET(); // send the request
 
if (httpCode > 0) // check the returning code
{
String payload = http.getString(); //Get the request response payload
 
DynamicJsonBuffer jsonBuffer(512);
 
// Parse JSON object
JsonObject& root = jsonBuffer.parseObject(payload);
if (!root.success()) {
Serial.println(F("Parsing failed!"));
return;
}
 
float pm1 = (float)(root["0"]["value"]);
int pm2 = root["main"]["humidity"]; 
float temperatura = (float)(root["main"]["pressure"]); 
float vlaga = root["wind"]["speed"];
 
// print data
Serial.printf("PM 2,5 = %.2f°C\r\n", pm1);
Serial.printf("PM 10 = %d %%\r\n", pm2);
Serial.printf("Temepratura = %.3f bar\r\n", temperatura);
Serial.printf("Vlažnost = %.1f m/s\r\n", vlaga);
 
display.setCursor(0, 24);
display.printf("PM 2,5: %5.2f C\r\n", pm1);
display.printf("PM 10 : %d %%\r\n", pm2);
display.printf("Temperatura : %.3fbar\r\n", temperatura);
display.printf("Relativna vlažnost : %.1f m/s\r\n", vlaga);
display.drawRect(97, 56, 3, 3, WHITE);
display.display();
 
}
 
http.end(); //Close connection
 
}
 
delay(60000); // wait 1 minute
 
}
// End of code.

```

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 1, 2022, 3:42pm UTC](https://forum.sensor.community/t/display-over-air/1282/8 "2022-04-01T15:42:59Z")

</div>

Hi, im almost done with these.  
But today I added SHT30 to my wemos and I have nov 2 json files, how can I have just one, with temp and humity?

Thanks

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [April 1, 2022, 4:46pm UTC](https://forum.sensor.community/t/display-over-air/1282/9 "2022-04-01T16:46:10Z")

</div>

What do you mean with 2 json ? When you call the API ?  
Send me the json you have

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 1, 2022, 4:50pm UTC](https://forum.sensor.community/t/display-over-air/1282/10 "2022-04-01T16:50:21Z")

</div>

HI, system creates 2 sensor ID, so I just pull data from on on my wemos  
one is 70977 for PM2,5 and 10, ad 70978 for SHT30.

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [April 1, 2022, 5:03pm UTC](https://forum.sensor.community/t/display-over-air/1282/11 "2022-04-01T17:03:35Z")

</div>

OK I understand. I have never tried to put 2 TRHP sensors. Actually you can t change this. You have to merge in your code or show just 1

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 3, 2022, 12:39pm UTC](https://forum.sensor.community/t/display-over-air/1282/12 "2022-04-03T12:39:22Z")

</div>

Thx, I got it to work.  
I will post my dirty code soon here.

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [April 3, 2022, 4:06pm UTC](https://forum.sensor.community/t/display-over-air/1282/13 "2022-04-03T16:06:21Z")

</div>

I have just seen you run the loop once every minute. The data are updated every 5 minutes. Please increase to avoid API overload. Will you put the code in a GitHub ?

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 3, 2022, 4:22pm UTC](https://forum.sensor.community/t/display-over-air/1282/14 "2022-04-03T16:22:52Z")

</div>

I pull data once, than I use for loop to run it 10x in loop.  
I can incrasse that to 20x times.

Or 4min is OK.

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 3, 2022, 4:23pm UTC](https://forum.sensor.community/t/display-over-air/1282/15 "2022-04-03T16:23:25Z")

</div>

Yes I will, is very “dirty” need some polishing.

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [April 3, 2022, 5:35pm UTC](https://forum.sensor.community/t/display-over-air/1282/16 "2022-04-03T17:35:58Z")

</div>

Yes 4 minutes would be better.

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 3, 2022, 6:40pm UTC](https://forum.sensor.community/t/display-over-air/1282/17 "2022-04-03T18:40:26Z")

</div>

Done.  
I also post regarding not able to add second sensor, can U help me in that way?

---

<div class="post-metadata">

### Author: ![pjg](https://forum.sensor.community/user_avatar/forum.sensor.community/pjg/32/194_2.png) [@pjg](https://forum.sensor.community/u/pjg)
#### Post date: [April 3, 2022, 6:44pm UTC](https://forum.sensor.community/t/display-over-air/1282/18 "2022-04-03T18:44:59Z")

</div>

Unfortunately not. @ricki-z has to do it.

---

<div class="post-metadata">

### Author: ![divfili](https://forum.sensor.community/user_avatar/forum.sensor.community/divfili/32/785_2.png) [@divfili](https://forum.sensor.community/u/divfili)
#### Post date: [April 3, 2022, 6:48pm UTC](https://forum.sensor.community/t/display-over-air/1282/19 "2022-04-03T18:48:40Z")

</div>

OK, Thank U anyway.  
I also send email to tech@

---

<div class="post-metadata">

### Author: ![ricki-z](https://forum.sensor.community/user_avatar/forum.sensor.community/ricki-z/32/215_2.png) [@ricki-z](https://forum.sensor.community/u/ricki-z)
#### Post date: [April 3, 2022, 11:38pm UTC](https://forum.sensor.community/t/display-over-air/1282/20 "2022-04-03T23:38:31Z")

</div>

@divfili SHT30 should be added now.

[Next page](https://forum.sensor.community/t/display-over-air/1282.md?page=2)
