Giter VIP home page Giter VIP logo

animated-weather's Introduction

Animated Weather

animated weather is a Qt/Qml project for RaspberryPi that is Interacting to html/css/js with Qtwebengine and its show the current real-time weather statistics by Graphical animation and weatherapi.com API

Essentials

Qt creator 6
Raspberry pi 3 or Above with Buster Os and QtWebengine module

Usage

RPI:

#this is optional but can be effective on project running
$ sudo nano /boot/config.txt
#change raspberry pi arm_freq to 1400 and core_freq to 500 but keep it cool please
arm_freq=1400
core_freq=500

# Enable DRM VC4 driver with add this line at the bottom
dtoverlay=vc4-fkms-v3d

#change raspberry pi gpu memory to 256 at least
gpu_mem=256

QT Creator:

#At the Qt Creator you must to add some system environment variable to run the project with maximum 
rendering color option (grayscale and color depth problem can resolve with this method)
1. open the project with Qt Qreator
2. click on 'projects' button from left tabview (or just press the CTL+5)
3. find 'environment ->> details' option under 'RUN' option
4. click on add and set like these :
          variable              |           value
   QTWEBENGINE_DISABLE_SANDBOX  |             1
   QT_QPA_EGLFS_FORCE888        |             1
   QT_QPA_EGLFS_DEBUG           |             0
note that the last variable is just for debug option and i turend off also

Explain qml variable Code:

#signUp in weatherapi.com and get yours API key from dashboard and replace your API key with this this
    weatherApiKey: "Replace the weatherapi.com API key here!"

#change city name (tehran is default)
   cityName: "tehran"

#weather statistics are update every x minutes
   delayUpdateLoop: 5 //minutes
#weather retrying timeout for update the weather statistics
   delayCheckingUpdate: 10 //Secounds

resize the widget:

./wtools/css/style.css

  width:627px;
  height: 408px;

change weather label:

./wtools/js/conditions.js

#you can define day/night text and which weather graphical page when weather API Sent
 the exact status Code

example:
{
 "code" : 1000,
 "day" : "آفتابی", //show this weather text when is day
 "night" : "مهتابی", //show this weather text when is night
 "icon" : 113,
 "w_index": 4 //clear sky page will load
},

**************** note: ****************
w_index    |   summary Weather
  0               snow page
  1               windy page
  2               light rain page
  3               heavy rain page
  4               clear sky page
  5               cloudy sky page
 

Tested Devices

  • Raspberry Pi 3 - Buster V10
  • ubuntu 20.04 LTS

Some Resources That Used

main Graphical source by ste-vg on codePen.

js GSAP animation library

Interacting html with qml over QtWebChannel

Contact Us

Email

animated-weather's People

Contributors

qtkade avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

519984307

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.