element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Just Encase
  • Challenges & Projects
  • Design Challenges
  • Just Encase
  • More
  • Cancel
Just Encase
Blog Just Encase Design Challenge – Winter Driving Safety (Blog #2)
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Just Encase to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dwinhold
  • Date Created: 24 Jan 2022 4:31 PM Date Created
  • Views 899 views
  • Likes 9 likes
  • Comments 3 comments
  • design_challenge
  • MKR1300
  • dwinhold
  • Winter_driving_safety
  • just_encase
Related
Recommended

Just Encase Design Challenge – Winter Driving Safety (Blog #2)

dwinhold
dwinhold
24 Jan 2022

Welcome to Blog #2 of Winter Driving Safety

I have been working on the GPS speedometer, carbon monoxide detector and the mini-weather station all at once. This wasn’t a good idea since I get sidetracked very easily and get nowhere. So, I started to focus on one thing at a time, starting with the weather station. This weekend I got the temperature and humidity sensor working with the TFT screen. My first issue I ran into was I didn’t have a TFT screen in amongst all my collection, or so I thought. I found a Microduino TFT and modified the wiring to work. This solved the “Not having a colour screen issue”.

Below is the code and pictures of how it works so far.

Microduino TFT

image

Arduino Connection:

image

Code:

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <SPI.h>
#include <dht.h>

#define DHT11_PIN     5

#define TFT_CS        10
#define TFT_RST        9 
#define TFT_DC         8
#define TFT_MOSI 11  // Data out
#define TFT_SCLK 13  // Clock out

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

dht DHT;


void setup(void) {
  Serial.begin(9600);
  Serial.print("Just Encase Design Challenge");

  tft.initR(INITR_BLACKTAB);      // Init ST7735S chip, black tab

  // Screen size 128x160
 
  // Start-up Screen
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(30,40);
  tft.setTextColor(ST77XX_RED);
  tft.setTextSize(1);
  tft.println("Just");
  delay(1000);
  tft.setCursor(30,60);
  tft.println("Encase");
  delay(1000);
  tft.setCursor(30,80);
  tft.println("Design");
  delay(1000);
  tft.setCursor(30,100);
  tft.println("Challenge !!");
  delay(2000);
  tft.fillScreen(ST77XX_BLACK);
  tft.setCursor(30,40);
  tft.println("Winter");
  delay(1000);
  tft.setCursor(30,60);
  tft.println("Driving");
  delay(1000);
  tft.setCursor(30,80);
  tft.println("Safety!! ");
  delay(2500);
  tft.fillScreen(ST77XX_BLACK);
}

void loop() {

  int chk = DHT.read11(DHT11_PIN); // Reads DHT11 Sensor
  switch (chk)
  
  tft.setTextWrap(false);
  tft.setCursor(0, 1); // Temperature Screen Location
  tft.setTextColor(ST77XX_RED);
  tft.setTextSize(1);
  tft.println("Temperature: ");
  tft.setCursor(80,1);
  tft.println(DHT.temperature, 1);
  tft.setCursor(0, 40); // Humidity Screen Location
  tft.println("Humidity: ");
  tft.setCursor(80,40);
  tft.println(DHT.humidity, 1);

  delay(2000);
  
  tft.setTextColor(ST77XX_BLACK); //Erases current readings
  tft.setCursor(80, 1);
  tft.println(DHT.temperature, 1);
  tft.setCursor(80,40);
  tft.println(DHT.humidity, 1);
  
   
}

Working photos:

image

image

image

I would have had more to report but my daughter contracted COVID and is really sick right now. More updates to come shortly!!

I am also adding in basic winter survival into my project. This is important in case you get stuck somewhere and help won't come for a while. I'll explain how to stay warm, what to prepare for and how long to prepare to wait.

Dale Winhold

  • Sign in to reply
  • dwinhold
    dwinhold over 3 years ago

    Thank you for your get well wishes for my daughter!! She is starting to feel better!! Luckily we all are double vaccinated.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Good start on the screen.

    Hopefully you daughter will have an easy time with Covid.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 3 years ago

    Hope she gets better soon. We need you and her back in the saddle.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube