Using GitHub with your Sense HAT

For the following steps, you have to ssh into your Respberry Pi:

ssh pi@raspberrypi

The default password for user pi is raspberry. You can change this following the procedure described at the Raspberry Pi page.

  • First create a new repository:

echo "# sensehat" >>
git init
git add
git commit -m "first commit"
git remote add origin
git push -u origin master
  • Tell GitHub who you are:

git config --global ""
git config --global "Your Name"
  • Generate a new SSH key

ssh-keygen -t rsa -b 4096 -C ""

Press Enter to set a default file location. When asked to Enter passphrase …​, provide a safe password.

  • Add new SSH key to your GitHub account

    • Copy the SSH key to your clipboard


cat ../.ssh/
# assuming that the current folder is /home/pi/sensehat

Copy the key and paste it into GitHub

  • Push your first commit

git commit -m "initial commit"
git push origin master


Using the Raspberry Pi Sense HAT and Scratch 2

Check your system, if you have a more recent version, Scratch 3 may be available.

Update your Raspberry Pi

sudo aptitude update
sudo aptitude safe-upgrade

Install Scratch on your Raspberry Pi:

sudo aptitude install scratch2

In order to use the interface of Scratch, you can use Remote Desktop Server on your Raspberry Pi. This will allow you to connect to your Raspberry Pi from another device. This is particularly useful if you don’t have a screen, keyboard and mouse connected to your Raspberry Pi.

One approach to set up a Remote Desktop Server, is to install VNC (Virtual Network Computing) on your Raspberry Pi:

sudo apt-get install vnc4server

On your Raspberry, retrieve the local IP address:

hostname -I

You can then install on your laptop, tablet or desktop a VNC viewer.