Getting started with a Raspberry Pi - an LED Matrix

Post on 21-Jan-2018

132 views 2 download

transcript

WHAT IS THIS TALK ABOUT

How to get started with a Raspberry Pi from scratch

What things I found interesting along the way

Does it have a use at UniSuper?

Good questions get a chocolate

Bad questions get chalk

My decision on the quality of question is final!

BUY A RASPBERRY PI

Search the internet – lots of sites

Get

a case, 5V power supply

Memory with NOOBs pre-installed (or 8GB + download/torrent NOOBs)

Most other things a scroungable

Mouse, keyboard, network cable (even power supply given phone chargers these days, check the amps..)

For the LED matrix in particular

The LED matrix (Embedded adventures)

10 Female/Female connectors (or a breadboard etc.)

5V USB charger (optional)

Lego (not optional)

PLUG IT IN & TURN IT ON

MAKE IT HEADLESS

First, change your password, open up the terminal and type in (its obvious from there)

sudo raspi-config

Back at the terminal, type in

sudo apt-get install xrdp

Every time it boots now it will automatically start up a remote desktop client and you can connect using RDP, VNC, CoRD, whatever takes your fancy…

PUT IT SOMEWHERE LESS ANNOYING

GETTING EVERYTHING WORKING

What is your IP address

Macs have LanScan

iPhone/iPads have Fing

Sure there is a million other tools (fireshark etc…)

Working on the computer

RDC works – I do it that way here at work

CoRD works well on the MAC

Moving files between computer & Pi

Filezilla works a treat (sftp)

Installing node.js (from the terminal)

wget http://node-arm.herokuapp.com/node_latest_armhf.deb

sudo dpkg -i node_latest_armhf.deb

And for the html server (and json API’s) load express

npm install express

npm install nconf –save (I was feeling dirty!)

HARDWARE – DO WE HAVE TO…

Pin mappings

Lego

1kg of lego bought off ebayprovides quite the challenge for creating a suitable harness.

NOW WE START HAVING FUN!

For specific details see

http://rods-stuff.blogspot.com.au

Load the code

Python to run the LED matrix

JS to run the html server

HTML/JS for the display page

1’S AND 0’S

LETS RUN IT

Run the python script

Starts scanning for messages

DO we get “- - -”

Start the node server

Waiting for http post messages

Lets do some Python unit test

Static

Scroll

Flashing

Deleting

PAINFUL & MORE INTERESTING

A bit more fun

Knight rider

Heartbeat (see next slide)

Pacman

Tram!!!

UNISUPER?????

Information for devs/testers

Breaking the build

Deployed versions

What do you think?

Chocolate or chalk

QUESTIONS?