Presentation is loading. Please wait.

Presentation is loading. Please wait.

SCRATCH Weather Dashboard

Similar presentations


Presentation on theme: "SCRATCH Weather Dashboard"— Presentation transcript:

1 SCRATCH Weather Dashboard
Gladys Gonzalez

2 Materials: Raspberry Pi 3 Peripherals: Downloads: Mouse & Keyboard
HDMI Cable Power Supply Display Micro SD Card Downloads: Raspbian OS Python3 Scratch Python script Guide (with GitHub edits) at:

3 Project Expectations:
See weather data around United Kingdom towns Run a Python script to connect to weather stations  Access the external script using enabled remote sensors in the Scratch program Fetch weather data from specific Weather Stations Display using Scratch animations

4 Steps Set up Raspberry Pi for first time use
Download software and the Python script Open Scratch and enable remote sensors Run the script (& keep it running, as it will feed data to scratch and will also constantly listen out for broadcasts) Work on Scratch Making variables  Setting variables to specific Weather Station IDs to collect data   Simultaneously Visualize data being fetched and produced Display the Animation

5 Step 1: Set up Download RASPBIAN OS image to SD card
Use Win32 Disk Imager to write the image on the SD card Load the SD card in the slot on the Raspberry Pi Connect all peripherals (power supply being the last) Connecting the power supply will automatically power on the device, so make sure all other components are ready.

6 Step 2: Download Python script
Open Terminal (Ctrl, Alt, T) Type the command: wget –O interface.py rpf.io/wsd

7 Step 3: Open the Scratch Program
RUN the preloaded Scratch program (in Raspbian OS) In “sensing blocks” right click “slider sensor value” and enable remote sensor connections This is to be able to fetch the data from the Python script

8 Step 4: To run the downloaded script
In the Terminal type the command: python3 interface.py

9 Step 5: Back to Scratch Program
Create a new Variable Set the variable to a weather Station ID

10 Step 5 (Continued): Sensors
In “Sensing” blocks use the “Slider Sensor” block and the pull down menu to select which sensors to collect data from

11 Step 5 (Cont.) : Use Different Blocks to Display the Data

12 Step 5 (Cont.) : Create & Customize Sprites by uploading images

13 Step 5 (Cont.) : Thermometer Settings
Configure the settings so that the gauge in the thermometer image moves up and down as the weather value is displayed.

14 Step 5 (Cont.) : Arrow Settings
Configure the settings for the arrow sprite that was created to show the speed and direction of the wind.

15 Step 5: Display the animation!
When all blocks are in place Click the GREEN FLAG to begin the animation!

16 Final Remarks: Join multiple blocks using variables and the sensors to achieve data output. Using the Scratch website will cause an “undefined” error in the sensing blocks. Certain Sensing blocks may only be available in the Scratch Program and not on the web version of Scratch.

17 WEB/IOT The idea was to send this animation to my website so it can be displayed with my other animation. Next steps: Figure out how to have the animation work on a website without using the web version of Scratch Use a tracker on the website to see how many people watch the animation


Download ppt "SCRATCH Weather Dashboard"

Similar presentations


Ads by Google