====== WPS IOT LINK EXAMPLES - CONTROLLING THE INTERNET OF THINGS: ====== The resources are all located in the school but are all available from home for authorised users. All of the toys are cheap, off-the-shelf items that require no, or minimal, modification All of the controls and resources are fully compatible with with modern web browser and accessible via desktop computer, tablet or smartphone. Students create their own code and user interfaces to control and integrate everything using simple HTML web pages alone! Students have full control over the look and feel of their user interface using whatever images, sound or other multi-media elements they may choose to integrate. **All of the HTML coding is created independently by each student using only a simple text editor.** ====== Example WPS IOT Links: ====== {{ :learn:steam:brainbox:young-coders:iot:iot-light-640x360.jpg |IOT Remote Control Lamp}} === Image 1. IOT Remote Control (Turn remote lamp on/off to activate a solar hula toy) === **The current WPS student IOT systems include the remote control of:** * **Radio Frequency 240V switches** (suitable for **all** standard household appliances) * **Infrared Remote Controls** - Full control of TV's PVR's, Toys and any other standard IR Device. * **Low Voltage Relays** - Full on-off control of any low voltage device. * **Interactive Radio Control** - Real-time control of RC drones, cars and similar devices. * **WIFI control** of specialised remote devices such as Pan, Zoom and Tilt security cameras. * **Full multimedia integration** for user interface design and for output * **FUll HD, remote controlled video/audio streaming** Example using Raspberry Pi - Simple switching using distance sensor and analogue inputs: https://www.raspberrypi.org/learning/physical-computing-with-python/worksheet/ **HINT:** First open a streaming video link and then open a separate browser window to implement your controls. This provided almost instant feedback (depending on network quality), so that you can to see what is happening at the remote end when you press a control button on your browser. **NOTE:** Each of the following links opens in a new browser tab - Close the new, unwanted tab to return to this page (this is a wiki limitation only) ====== Example Controls: ====== === Quick Demo Switch with Close-up Infrared Video Stream: === - [[http://flipster.tv/thingycam/wps-stream.html|IMPORTANT: CLICK HERE FIRST]] to view results in real time when lamp (next item) turned on/off. - [[http://flipster.tv/34spi/rf/switch_06/on/|Desk lamp ON]] (activate solar-cell powered dancing Hula/Flower devices) - [[http://flipster.tv/34spi/rf/switch_06/off/|Desk lamp OFF]] (de-activate solar-cell powered dancing Hula/Flower devices) === Video & Camera Monitoring/Control: === - [[http://flipster.tv/iot/twister01.php|DP Office - Twister01 Webcam Control]] (Live, two-way audio + video streaming (audio disabled for demo)) - [[http://flipster.tv/iot/twister-generic.php|DP Office - Twister01 Low Res.]] Best way to monitor remote actions via low bandwidth (mobile phone, tablet etc.) - [[http://flipster.tv/thingycam/wps-stream.html|DP Office - ThingyPi IR Camera]] (RaspberryPi HD InfraRed Streaming & stop-motion video camera) - Not currently active: [[http://flipster.tv/34spicam/wps-stream.html|WPS 34SPi IR Camera]] (RaspberryPi HD Full colour streaming and stop-motion video camera) === 34SPi Remote Control System (Located in DP's Office): === Don't forget, you can view the real-time remote activity via [[http://flipster.tv/iot/twister.html|live video stream]] (optional audio stream currently disabled). - [[http://flipster.tv/34spi/rf/switch_08/on/|Solar House ON]] (turn ON solar house and lights ON for all houses in street) - [[http://flipster.tv/34spi/rf/switch_08/off/|Solar House OFF]] (turn OFF solar house and lights OFF for all houses in street) - [[http://flipster.tv/34spi/gpio/18/click/|Play Remote Sound 01]] (play a sound that is only audible at remote location - in DP's office) - [[http://flipster.tv/34spi/gpio/19/click/|Play Remote Sound 02]] (play a different sound that is only audible at remote location - in DP's office) - Not currently active: [[http://flipster.tv/34spi/|34SPI Control Panel]] (Browser based, master switch control panel on RaspberryPi) === ThingyPi Remote Control System (Located in DP's Office): === - [[http://flipster.tv/thingypi/rf/switch_04/on/|Bowler Hat ON]] (Safely turn ON office light using radio control 240V power switch) - [[http://flipster.tv/thingypi/rf/switch_04/off/|Bowler Hat OFF]] (Safely turn OFF office light using radio control 240V power switch) - [[http://flipster.tv/thingypi/rf/switch_03/on/|Enable Toys*]] (Robot eyes will flash briefly when turn ON low voltage plug pack for toys using radio control 240V power switch) - [[http://flipster.tv/thingypi/rf/switch_03/on/|Disable Toys*]] Safely turn OFF low voltage plug pack for toys using radio control 240V power switch) - [[http://flipster.tv/thingypi/gpio/10/click/|Robot Dance*]] (When item #3 enabled: Send command to make $12 //KMart// robot toy sing and dance) - [[http://flipster.tv/thingypi/gpio/13/click/|Spider FWD*]] (When item #3 enabled: Send command to make $10 //Reject Shop// Ifrared controlled toy spider move forward) - [[http://flipster.tv/thingypi/gpio/15/click/|Spider ROT*]] (When item #3 enabled:Send command to make Ifrared controlled toy spider spin around) - [[http://flipster.tv/thingypi/rf/switch_05/off/|Power 1,2,3,4 OFF]] (Send command to safely turn a group of radio control power points OFF) - [[http://flipster.tv/thingypi/rf/switch_10/off/|Power 6,7,8,9 OFF]] (Send command to safely turn a different group of radio control power points OFF) - [[http://flipster.tv/twister/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=admin&pwd=MyBxxxxx5|Webcam Snapshot]] (Take a real-time snapshot from the remote webcam - includes time-stamp on image) - Not currently active: [[http://flipster.tv/thingypi/|ThingyPI Control Panel]] (Browser based, master switch control panel on RaspberryPi) === How To Integrate/Control Remote Multi-media Content Into Your Web Page(s): === You must create a link to 'join the dots' by using forward slashes "/" to join each part together to make a link from your browser to the remote device. You must also place your link within the correct HTML5 multimedia tags. ====== Example - Simple HTML Coding to Create Multimedia Content: ====== - [[http://flipster.tv/34sfiles/simple-sound.html|Play Remote Sound 01]] - [[http://flipster.tv/34sfiles/simple-video.html|Play Remote Video 01]] ---- {{ :brainbox:young-coders:iot:wps-map-example-bg.jpg?640x425 |Example - Coding Simple Interactive Games}} === Image 2. Example HTML Coding - Creating simple HTML interactive multimedia games === - [[http://flipster.tv/34sfiles/wps-map-00.html|Create Simple Web-based Multimedia Interactives]] - Hover mouse around over image areas (head,tummy,window,tree) to find hidden sounds/images! See the X/Y Co-ordinates at top right hand side of image - the co-ordinates are used in code to activate elements when user positions mouse within student-specified co-ordinate values. - [[http://flipster.tv/34sfiles/wps-map-03.html|Create Simple Web-based Multimedia Interactives]] - More complicated: Some Youtube controls do not work from inside DoE - Click on TV screen to pause video using on-screen control if buttons not working! ====== Example HTML Code Used By Students: ====== This is some example HTML5 code that you may add to your personal web page to create a link to **play a remote sound**: Example link using the above code: * [[http://flipster.tv/34sfiles/simple-sound.html|Play remote sound]] === To play a remote video: === The resources are all located in the school but are all available from home for authorised users. Here is some example HTML5 code that you may add to your web page to create a link to **play a remote video:** Example link using the above code: * [[http://flipster.tv/34sfiles/simple-video.html|Play remote video]] Also, see WC3 Schools [[http://www.w3schools.com/HTML/html5_video.asp|HTML5 video]] and [[http://www.w3schools.com/HTML/html5_audio.asp|HTML5 audio]] coding tutorials. **NOTE:** It may take a few seconds for a sound and/or video link to appear in the page...! If the link(s) fail(s) to appear after one minute, try refreshing your web page. **Here is some information about how to use RaspberryPi server(s) to control the Internet Of Things:** The links to 'things' is like finding the route map: you need to start at the beginning and 'join the dots' that take you on a clear path to the destination. Viewing Table 1 can help you 'join the dots' (creating a valid URI) by joining the correct site name, server name, switch type and the switch action: ---- ++++ Appendix A| === The Information You Will Need To 'Join The Dots' === * Private server address (direct): 10.206.33.17 * Public server address (proxy): web1.wahroonga-p.schools.nsw.edu.au * Private link to 34Spi server: 10.206.33.17/34spi/ * Public link to 34Spi server: web1.wahroonga-p.schools.nsw.edu.au/34spi/ ^Name ^Location ^Switch type ^Pin/device number/id ^ Valid actions ^^^ ^Relay 01 |34spi |gpio ((RaspberryPi GPIO)) |3 | - | - |flip | ^Relay 02 |34spi |gpio |5 | - | - |flip | ^Button 1 |34spi |gpio |7 | - | - |click | ^Button 2 |34spi |gpio |8 | - | - |click | ^Switch 1 |34spi |rf ((Radio Frequency switch)) |switch_01 |on |off | - | ^Switch 2 |34spi |rf |switch_02 |on |off | - | ^Sound 01 |34spifiles |((see example HTML5 code below)) |sound-01.mp3 | | | | ^Video 01 |34spifiles |((see example HTML5 code below)) |video-01.mp4 | | | | === To control a remote device: === You must create a link to 'join the dots' by using forward slashes "/" to join each part together to make a link from your browser to the remote device: === For example: === - To turn Relay 01 on/off from within school: http://10.145.169.17/34spi/gpio/5/flip - To turn Relay 02 on/off from within school: http://10.145.169.17/34spi/gpio/5/flip - To turn Switch 2 on from within school: http://10.145.169.17/34spi/switch_02/on - To press Button 1 2 from within school: http://10.145.169.17/34spi/gpio/7/click See the introductory and advanced [[:brainbox:young-coders:home|HTML coding information and examples]] for more help. === Advanced HTML === Advanced HTML - How to add interactive multimedia to your web pages: Students will be supplied with a complete set of files that they can download to experiment and play with. This allows the students to customise and edit all features found in the examples below, plus optionally incorporate their own original multimedia works: === Working With Interactive ImageMaps === - [[http://wps.flipster.org/steam/static/wps/wps-map-00.html|WPS ImageMap Example 00]] - [[http://wps.flipster.org/steam/static/wps/wps-map-01.html|WPS ImageMap Example 01]] - [[http://wps.flipster.org/steam/static/wps/wps-map-02.html|WPS ImageMap Example 02]] - [[http://wps.flipster.org/steam/static/wps/wps-map-03.html|WPS ImageMap Example 03]]* *NOTE: Example 03 requires access to youtube - The TV content may not work from inside school. === Working With Interactive Multimedia === - [[http://wps.flipster.org/steam/static/wps/sound.html|HTML5 Sound Embed Test]] - [[http://wps.flipster.org/steam/static/wps/video.html|HTML5 video Embed Test]] **ThingyPI:** Your mission is to create one or more web pages that can switch the remote devices on/off The things at the remote site are connected to a Raspberry Pi that is running a 'flask' web server. Using the information supplied below, create your own web page and add code that can control the remote 'things' via the Internet. There is a real-time video streaming service that you can view (to monitor the changes at the remote site. There are also real-time sounds which you can be played when you make a change to things connected to the ThingyPi server. Here are the links and tools that you will need to control the things on the ThingyPi server: - Server IP address 10.145.169.27 (only from inside school at the moment - soon from home) * Hostname: thingypi.schools-nsw.org - Mains voltage (240V) radio control (RC) switches (to turn power on/off) * Example: http://10.145.169.27/rf/switch_01/on - Low voltage (3-12V), relays (to turn battery controlled devices on/off) * Example: http://10.145.169.27/gpio/switch_01/on - General Purpose In/Out (GPIO) (write your own code to control Rasperry Pi GPIO logic pins) * GPIO Input: http://10.145.169.27/gpio/16/click/ - Actions: 'click' only * GPIO Output:http://10.145.169.27/gpio/8/click/ - Actions: [on|off|click|flip] - Streaming video with Pan, Tilt and Zoom (PTZ) controls (write your own code to control and/or embed live video stream in your own web page) * Link: http://10.145.169.27:89/wps-stream.html - Infrared streaming camera (write code to view and/or embed live video stream in your own web page) * Link: http://10.145.169.16:88/videoMain - Streaming Sound and Video 'on demand' (write your own code to play/embed remote sound effects in your page) * FIXME A range of example devices and toys are connected to the above switches. These will be updated and changed depending on availability and student ideas/suggestions/requests ++++ ---- ====== STEAMpunks In Space ====== Summary: At face value, the Cuberider project has one unique feature: it enables students to design and operate a simple experiment on-board the ISS at an undisclosed cost and an unmeasured improvement in student motivation/learning outcomes (also, what is the $$ cost per student?). It the secondary advantage of being an Australia based, and Australian funded/sponsored project. The sample teaching module (the PPT example supplied by CUBERIDER) does not include enough information to enable useful feedback. In every other regard the [[https://astro-pi.org/about/hardware/|Raspberry Pi + Astro-pi]] combination, and others, provide a wider range of features, resources, support and scaleability at lower cost. For the above reasons, participation has PR value but no evidence that it is worth investing more significant effort hoping for any deeper learning outcomes === CUBERIDER === The [[http://www.startupdaily.net/2015/07/sydney-startup-quberider-using-ridesharing-help-send-developers-space/|cuberider project]]. Students design experiments using a Raspberry PI, an add-on hardware 'hat' and customised Python software. A limited range of experiments may be run on-board the ISS. An add-on teaching system is provided. Access to the ISS is based on the 'ride-sharing' principle - In this case, the primary client (NanoRacks) sends up an approved hardware device (via SpaceX rocket), then multiple clients (schools) send up software. The software for each school is sequentially loaded/deleted onto/from the client hardware at an agreed, scheduled time. The hardware payload includes a Rasberry Pi, an add-on board called 'Asimov', supplied by a company called [[http://www.obelisksystems.com/|Obelisk]]. The Python computer language is used to control the hardware and to collect data. A number of add-on sensor modules are available, including: Accelerometer, Gyroscope, Magnetometer, Dual Thermometers, Pressure, Humidity, Infrared Light, Ambient Light, Ultraviolet Light, Visible light Camera and Real-Time Clock NOTE: It is unclear what sensors will be included and/or useable on-board the ISS, but their usefulness for on-board experiment is likely to be very limited! The most direct comparison is with the === ASTRO-PI === Launched in 2014, astronaut [[https://www.raspberrypi.org/blog/astro-pi/|Tim Peake deployed a number of Raspberry PI 'Astro Pi' computers]] in various locations on board the ISS. He then loaded student-developed onto the devices whilst in orbit, set them running, collected the data generated and then download this to Earth where it was be distributed to school teams. The Astro-Pi hardware kit is [[http://au.element14.com/raspberry-pi/raspberrypi-sensehat/add-on-board-sense-hat-for-raspberry/dp/2483095|widely available internationally]] for around AU $50, which includes the following on-board sensors: * Gyroscope * Accelerometer * Magnetometer sensor * Temperature sensor * Barometric pressure sensor * Humidity sensor * Real time clock with backup battery * 8×8 RGB LED display * Multiple push buttons for external control The program was developed by Cambridge University and major sponsors include government, European Space agency and Google. A very wide range of [[https://www.raspberrypi.org/resources/|general]], [[https://astro-pi.org/resources/|project]] and [[https://astro-pi.org/|teaching resources]] are available on-line - including a [[https://astro-pi.org/updates/desktop-sense-hat-emulator/|web-based Astro-Pi simulator]] which allows an unlimited number of students to develop code and experiment on 'virtual' hardware devices. Information about AStro-Pi competition winners is [[https://astro-pi.org/competition/winners/|here]] [[https://astro-pi.org/competition/winners/#crewdetector|One]] [[https://astro-pi.org/competition/winners/#spacecraft|Spacecraft]] [[https://astro-pi.org/competition/winners/#flags|Flags]] [[https://astro-pi.org/competition/winners/#watchdog|Watchdog]] [[https://astro-pi.org/competition/winners/#trees|Treea]] [[https://astro-pi.org/competition/winners/#reactiongames|Reaction]] [[https://astro-pi.org/competition/winners/#radiation|Radiation]] ====== CUBERIDER & International Space Station (ISS) Limitations ====== The Cuberider experimental options for what can be done on-board the ISS is //extremely// limited compared with what can be done in the classroom or more generally, on planet Earth. Most of the add-on sensors will not be available or will not provide useful data in an ISS context [[https://www.reddit.com/r/space/comments/4ubqwi/help_us_think_of_an_experiment_to_send_to_the_iss/|Source]] Claims made in articles such as [[https://aboutcatholicschools.wordpress.com/2016/06/14/science-stars-students-create-for-space/|this one from Catholic Ed.]] are what some kind people might call 'questionable': I think this would be my favourite line: **“The project is very authentic because it’s challenging in some parts."**