14

Getting started with a Raspberry Pi - an LED Matrix

Embed Size (px)

Citation preview

Page 1: Getting started with a Raspberry Pi - an LED Matrix
Page 2: Getting started with a Raspberry Pi - an LED Matrix

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!

Page 3: Getting started with a Raspberry Pi - an LED Matrix

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)

Page 4: Getting started with a Raspberry Pi - an LED Matrix

PLUG IT IN & TURN IT ON

Page 5: Getting started with a Raspberry Pi - an LED Matrix

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…

Page 6: Getting started with a Raspberry Pi - an LED Matrix

PUT IT SOMEWHERE LESS ANNOYING

Page 7: Getting started with a Raspberry Pi - an LED Matrix

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!)

Page 8: Getting started with a Raspberry Pi - an LED Matrix

HARDWARE – DO WE HAVE TO…

Pin mappings

Lego

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

Page 9: Getting started with a Raspberry Pi - an LED Matrix

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

Page 10: Getting started with a Raspberry Pi - an LED Matrix

1’S AND 0’S

Page 11: Getting started with a Raspberry Pi - an LED Matrix

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

Page 12: Getting started with a Raspberry Pi - an LED Matrix

PAINFUL & MORE INTERESTING

A bit more fun

Knight rider

Heartbeat (see next slide)

Pacman

Tram!!!

Page 13: Getting started with a Raspberry Pi - an LED Matrix

UNISUPER?????

Information for devs/testers

Breaking the build

Deployed versions

What do you think?

Chocolate or chalk

Page 14: Getting started with a Raspberry Pi - an LED Matrix

QUESTIONS?