Get Stock Quote from Yahoo using Node-RED

[ { "id": "d5d3c55c.ff8808", "type": "debug", "z": "3b163621.c03b8a", "name": "", "active": true, "console": "false", "complete": "false", "x": 930, "y": 180, "wires": [] }, { "id": "39834827.c17818", "type": "http request", "z": "3b163621.c03b8a", "name": "Yahoo Stock", "method": "GET", "ret": "txt", "url": "http://download.finance.yahoo.com/d/quotes.csv?s=^IXIC&f=nsl1opc1p2&e=.csv", "tls": "", "x": 510, "y": 180, "wires": [ [ "247647e3.b30f88", "5db14531.5fb30c" ] ] }, { "id": "5aba260a.74be08", "type": "inject", "z": "3b163621.c03b8a", "name": "Click me to request a stock quote...", "topic": "", "payload": "", "payloadType": "date", "repeat": "", "crontab": "", "once": true, "x": 210, "y": 180, "wires": [ [ "39834827....

October 17, 2017

Install Docker and Compose on Debian 9 Stretch

#!/bin/bash apt-get update apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable" apt-get update apt-get install -y \ docker-ce \ docker-compose If you plan on using the –memory flag when creating containers, you may need to enable memory and swap accounting in the Kernel. Log into the Ubuntu host as a user with sudo privileges....

October 3, 2017

Sonic Pi Coding Class 003

Last week we wrote a function to set the volume based on musical dynamics like ‘ppp’ or ‘fff’ Functions can also be used to return information to us. An example of a function that returns a value is below. Type it in and see how it works. define :get_volume do |music_notation| # Write your code here to work out volume level # corresponding to music_notation like 'ppp' # Return the volume level like this # return volume_level # Or we could just return a number for this # example to see how it works return 0....

September 14, 2017

Choosing a Random Synth in Sonic Pi

Towards the end of our coding class at school today, one of the children asked me how they would choose a random synth in their code. I couldn’t give them the answer off of the top of my head so I came home and have placed two different solutions below: # Choosing a Random Synth in Sonic Pi # Solution 1 10.times do use_synth [:beep, :blade, :cnoise, :dpulse].choose play :C3 sleep 1 end # Solution 2 10....

August 10, 2017

AWS Polly Service with Node-RED

I have used NodeRed to subscribe to messages from an MQTT service I have running that publishes various messages from various nodes around our house. The NodeRed code listens for some of these messages and uses the AWS Polly Service to convert them to speech and read them out to us. There’s a sample of the speech, below, as well as screen shots of the NodeRed flows. Alexa...

August 9, 2017

Check or Change the Timezone in Debian

To see or change what timezone your Debian system is configured for: dpkg-reconfigure tzdata More detailed information is available in the Debian Wiki More specifically, I used this in a setup of HypriotOS, a minimal Debian-based operating systems that is optimised to run Docker on ARM devices. In this instance it was an old Raspberry Pi Model B running NodeRed in a Docker Container. I needed to get the time in the Docker Container to match the time on the host....

August 9, 2017

Sonic Pi Coding Class - 002

My little boy, James, has been taking piano lessons for two terms now. Last week, his teacher asked him to do an assignment on a minuet. James knows I’ve been running a coding group at school with Sonic Pi so he asked his teacher if he could write his minuet in Sonic Pi as part of his work. It was his first coding in a non block type language like Scratch....

July 4, 2017

Sonic Pi Coding Class - 001

Resources: Sonic Pi Website… Introduction to Sonic Pi for Parents… Tutorial… Cheat Sheet… All Sonic Pi posts on this website…

June 22, 2017

Get Spell Checking Working in Libre Office on a Raspberry Pi

Spell checking never seems to work, by default, in Libre Office on a Raspberry Pi. To get it working: # Go to: https://extensions.libreoffice.org/extensions/english-dictionaries/ # Click on the Current Release or go to the below URL which # is current as of now! https://extensions.libreoffice.org/extensions/english-dictionaries/2017-01.01 # Download the .oxt file # In Libre Office go to Tools / Extension Manager # Add the .oxt file # Spell checking now works!

February 19, 2017

Mount a Network Drive on a Raspberry Pi

This has been tested on Jessie with the PIXEL Desktop. I haven’t tested it in previous versions. Substitute the IP address in fstab and the share name, as appropriate! # Make a directory in /mnt sudo mkdir /mnt/DataDisk # Edit fstab: sudo nano /etc/fstab # Add a line with a similar format as below //192.168.178.240/DataDisk /mnt/DataDisk cifs guest,iocharset=utf8,_netdev,x-systemd.automount 0 0 # Reboot and check that things mount OK after a reboot sudo shutdown -r now

February 19, 2017