Art Deco Weather Forecast Display

Home/Arduino Projects/Art Deco Weather Forecast Display

Art Deco Weather Forecast Display

Dear friends welcome back! In this video we are going to build this Art Deco Weather Forecast Display. It is a very useful and very easy project to build so without any further delay let’s get started!

Art Deco Weather Forecast Display – The Parts

Hey guys, I am Nick and welcome to educ8s.tv a channel that is all about DIY electronics projects. If you don’t want to miss any videos subscribe to the channel by clicking on this button! In this video we are going to see hot to build this Weather Forecast Display. It uses a Wemos D1 mini board along with a 1.8” Color TFT screen to display the weather forecast. I also designed and 3d printed an enclosure for this project using wood filament! I got the inspiration for this Art Deco style enclosure from an old radio.  The project connects to the internet and downloads the weather forecast for my location and displays it on the screen. The project only displays the weather icon, the temperature and the time of the prediction because I wanted a minimal look for this project. Of course you can easily add more information if you wish. Now let’s see how to build this project.

——————–
WHERE TO BUY
——————–

 

Wemos D1 Mini: http://bit.ly/WemosD1Mini

Color TFT: http://bit.ly/ColorTFT_18

Small Breadboard: http://bit.ly/SmallBreadboard

3 in 1 wires: http://bit.ly/Wires3InOne

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

 

The cost of the Art Deco Weather forecast display is very low it is around $12! You can find links for all the parts in the description below.

We also need an enclosure for this project. If you like the Art Deco enclosure I designed for this project you download it from Thingiverse.

——————–
ENCLOSURE 3D Files
——————–

http://www.thingiverse.com/thing:1964380

 

Art Deco Weather Forecast Display – The Code

——————–

LIBRARIES
——————–

📥 Adafruit GFX: https://github.com/adafruit/Adafruit-GFX-Library

📥 Adafruit ST7735: https://github.com/adafruit/Adafruit-ST7735-Library

📥Arduino JSON: https://github.com/bblanchon/ArduinoJson

Let’s see the code now. At first we have to set the SSID and the password of our WiFi network. Next we have to enter the free APIKEY from operweathermap.org website. In order to create your own API key you have to sign up in the website. Getting current weather data and forecast is free but the website offers more options if you are willing to pay some money. Next we have to find the id of our location. Find your location and copy the ID which can be found in the URL of your location. Then enter your city’s id in the CityID variable. The last step is to enter your time zone in order the project to display the correct time. Now we are ready to move on.

At first we connect to the WiFi Network. Then we request weather data from the server. I only request one result, the weather forecast for the next 3 hours. You can easily modify the code to get more forecast result if you wish. We get a reply with the weather data in JSON format. Before sending the data to the JSON library I manually delete some characters that were causing me problems.

Then the JSON library takes over and we can easily save the data that we need in variables. We have to take a look at the structure of the JSON data that the openweathermap website replies to see how to get the data we are interested in. After we have saved the data in variables, all we have to do, is to display them in the screen and wait for 30 minutes before requesting new data from the server. We display the time of the weather prediction, the temperature and the weather icon.

The weather icons consist of some bitmap graphics and some simple shapes. You can watch a detailed tutorial I have prepared on how to load custom bitmap graphics on Arduino by clicking on the card here. I have also prepared a version of the code which displays the temperature in degrees Fahrenheit. As always you can find the code of the project in a link in the description of the video.

——————–

CODE OF THE PROJECT
——————–

Download

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

2017-03-28T12:51:25+00:00

4 Comments

  1. abdis December 19, 2016 at 2:01 pm

    Dear friend i have done whatever you did .
    1. openweathermap api
    2. finding city id
    3. gmt timezone (5)
    4. ssid
    5. password

    uploaded without any error

    it connects network without any problems but on the screen 5:00 and C symbol is visible i thing from api.openweather.org site it doesnt get any info . what did i do wrong ?

  2. Dede January 22, 2017 at 2:25 am

    I installed everything and compiling goes error fest.

    Arduino: 1.8.1 (Windows 10), Board: “WeMos D1 R2 & mini, 80 MHz, Serial, 115200, 4M (3M SPIFFS)”

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In constructor ‘Adafruit_ST7735::Adafruit_ST7735(int8_t, int8_t, int8_t, int8_t, int8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:47:3: error: ‘_cs’ was not declared in this scope

    _cs = cs;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:48:3: error: ‘_rs’ was not declared in this scope

    _rs = rs;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:49:3: error: ‘_sid’ was not declared in this scope

    _sid = sid;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:50:3: error: ‘_sclk’ was not declared in this scope

    _sclk = sclk;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:51:3: error: ‘_rst’ was not declared in this scope

    _rst = rst;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In constructor ‘Adafruit_ST7735::Adafruit_ST7735(int8_t, int8_t, int8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:60:3: error: ‘_cs’ was not declared in this scope

    _cs = cs;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:61:3: error: ‘_rs’ was not declared in this scope

    _rs = rs;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:62:3: error: ‘_rst’ was not declared in this scope

    _rst = rst;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:64:3: error: ‘_sid’ was not declared in this scope

    _sid = _sclk = 0;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:64:11: error: ‘_sclk’ was not declared in this scope

    _sid = _sclk = 0;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::spiwrite(uint8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:93:20: error: ‘dataport’ was not declared in this scope

    if(c & bit) *dataport |= datapinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:93:33: error: ‘datapinmask’ was not declared in this scope

    if(c & bit) *dataport |= datapinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:94:20: error: ‘dataport’ was not declared in this scope

    else *dataport &= ~datapinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:94:33: error: ‘datapinmask’ was not declared in this scope

    else *dataport &= ~datapinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:95:8: error: ‘clkport’ was not declared in this scope

    *clkport |= clkpinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:95:20: error: ‘clkpinmask’ was not declared in this scope

    *clkport |= clkpinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::writecommand(uint8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:106:4: error: ‘rsport’ was not declared in this scope

    *rsport &= ~rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:106:15: error: ‘rspinmask’ was not declared in this scope

    *rsport &= ~rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:107:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:107:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::writedata(uint8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:123:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:123:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:124:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:124:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::commonInit(const uint8_t*)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:310:3: error: ‘colstart’ was not declared in this scope

    colstart = rowstart = 0; // May be overridden in init func

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:310:15: error: ‘rowstart’ was not declared in this scope

    colstart = rowstart = 0; // May be overridden in init func

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:312:11: error: ‘_rs’ was not declared in this scope

    pinMode(_rs, OUTPUT);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:313:11: error: ‘_cs’ was not declared in this scope

    pinMode(_cs, OUTPUT);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:314:3: error: ‘csport’ was not declared in this scope

    csport = portOutputRegister(digitalPinToPort(_cs));

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:315:3: error: ‘rsport’ was not declared in this scope

    rsport = portOutputRegister(digitalPinToPort(_rs));

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:316:3: error: ‘cspinmask’ was not declared in this scope

    cspinmask = digitalPinToBitMask(_cs);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:317:3: error: ‘rspinmask’ was not declared in this scope

    rspinmask = digitalPinToBitMask(_rs);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:337:13: error: ‘_sclk’ was not declared in this scope

    pinMode(_sclk, OUTPUT);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:338:13: error: ‘_sid’ was not declared in this scope

    pinMode(_sid , OUTPUT);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:339:5: error: ‘clkport’ was not declared in this scope

    clkport = portOutputRegister(digitalPinToPort(_sclk));

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:340:5: error: ‘dataport’ was not declared in this scope

    dataport = portOutputRegister(digitalPinToPort(_sid));

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:341:5: error: ‘clkpinmask’ was not declared in this scope

    clkpinmask = digitalPinToBitMask(_sclk);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:342:5: error: ‘datapinmask’ was not declared in this scope

    datapinmask = digitalPinToBitMask(_sid);

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:349:7: error: ‘_rst’ was not declared in this scope

    if (_rst) {

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::initR(uint8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:374:5: error: ‘colstart’ was not declared in this scope

    colstart = 2;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:375:5: error: ‘rowstart’ was not declared in this scope

    rowstart = 1;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:379:5: error: ‘colstart’ was not declared in this scope

    colstart = 2;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:380:5: error: ‘rowstart’ was not declared in this scope

    rowstart = 3;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::setAddrWindow(uint8_t, uint8_t, uint8_t, uint8_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:402:16: error: ‘colstart’ was not declared in this scope

    writedata(x0+colstart); // XSTART

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:408:16: error: ‘rowstart’ was not declared in this scope

    writedata(y0+rowstart); // YSTART

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘void Adafruit_ST7735::pushColor(uint16_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:420:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:420:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:421:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:421:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘virtual void Adafruit_ST7735::drawPixel(int16_t, int16_t, uint16_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:441:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:441:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:442:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:442:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘virtual void Adafruit_ST7735::drawFastVLine(int16_t, int16_t, int16_t, uint16_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:467:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:467:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:468:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:468:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘virtual void Adafruit_ST7735::drawFastHLine(int16_t, int16_t, int16_t, uint16_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:493:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:493:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:494:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:494:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp: In member function ‘virtual void Adafruit_ST7735::fillRect(int16_t, int16_t, int16_t, int16_t, uint16_t)’:

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:529:4: error: ‘rsport’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:529:15: error: ‘rspinmask’ was not declared in this scope

    *rsport |= rspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:530:4: error: ‘csport’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    C:\Users\Fennec\Documents\Arduino\libraries\Adafruit_ST7735_Library\Adafruit_ST7735.cpp:530:15: error: ‘cspinmask’ was not declared in this scope

    *csport &= ~cspinmask;

    ^

    exit status 1
    Error compiling for board WeMos D1 R2 & mini.

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  3. Keith Applegarth January 31, 2017 at 2:28 am

    Love the project. However, I set it up and getting data. Got the API key and CityID. My GMT is -7 and the display is reporting 28:00 and the temp is wrong – showing 14.4F when it is in the 60’s. I have downloaded the latest version.

    Am I missing something.

  4. Me March 29, 2017 at 9:26 pm

    Will not compile too many errors.

Comments are closed.

Close