Your project communicating with you the Boss:

 

 

Even more to come 2015:

 

An ambitious project. “Virtual GPIO”

  • So RPi has “GPIO” (General Purpose Input / Output)  pins to connect our many robotic bits.
  • And Arduino chip (the Mega 328 AVR chip) has GPIO – we know them as d2 – d13 and A0 – A7 pins.
  • But the mighty PC – in the wisdom of the PC manufacturing empire – has no GPIO functions exposed for us mortals to get at.

Enter “Virtual GPIO” – the GPIO that the PC didn’t have.  We can use python script – 99% identical to RPi python script – and control motors, analog inputs, Infrared remotes, LEDs, sonar, etc etc. DIRECT ON THE PC!

An eye-opening class …  wait for it!  July??

 

Class 24: 21 March 2015

For our first class in 2015, we will look at how the rPi can send automated/unattended emails to you.  Specifically, we will use GMAIL. (Gmail happens to be simpler to get running than lots of other miscellaneous email addresses.)

So you will need:

  • a gmail address. Create a new one ahead of time if you need to.  Note that quite commonly a “gmail address” is the same thing as a “google login” for any of the google empire, including the google address you will have needed to get any android device (phone/tablet) connected.  In our class you need to know the gmail email address and its password. Go to google gmail on your PC browser and confirm you can log in to that email.

    ir-rx

  • your rpi

 DOC FILE

 

Class 25: 4 April 2015

Arduino: Using your DVD or TV remote to send codes to arduino.

Find this little gizmo that was in your KIT#4: It’s the “eye” that reads remote signals. And arduino can read this very easily.

And bring whatever infrared remotes you can find around the house.

524b36e8757b7f3d6c8b4567This technique can be a primitive “keyboard” input to the arduino, a surprisingly effective and versatile one. Remotes have numbers and cursor functions and ok/exit buttons, and forward & back and stop/go buttons: that’s good for lots of simplistic control requirements.

HOMEWORK:
2 things to download to your laptop:

(1) “IRREMOTE” library. Use the “download ZIP” button at bottom right on:
     https://github.com/shirriff/Arduino-IRremote
I’ll explain where to put it in class.

(2)  The sketch file irtest.ino on the scripts page.  Paste it into a new arduino “sketch”.

speakersClass 26: 18 April 2015

Raspberry Pi – voice synthesis/output. Connect a speaker (any of those mp3/PC speakers) into the audio output socket, and your Pi can talk to you, any text you want to choose/program.

 

Espeak itself should be already on BS1 or BS2 or BS3 operating system.

But make sure your RPi has these installed also:

  • python-espeak
  • gespeaker

Also, download “text2speech” from    http://bit.ly/14XbLOC

(Onto your PC or onto the RPi)

 

Class 27: 2 May 2015

Last lesson we looked at ESPEAK, ways of getting the Raspberry Pi to turn text into voice to communicate with us. Necessarily, along the way, we also needed to look into some off-to-the-side issues like

  • “help” systems, –help,  man,   info,   python’s help()
  • parameters / arguments to executable programs
  • package installation using Synaptic
  • moving files between PC and the RPI (ie file sharing, file shares)

This class we will explore some more of these issues on the RPI:

  • More on file sharing between machines
  • Secure access: logging into RPI by SSH
  • File transfer by Filezilla (FTP/SFTP)
  • Running RPI’s programs using SSH

 PDF Version of Class

 

Class 28:16 May 2015

keypad

Simple Keypad.

There are 7 pins (L-R on the connector) first 4 for 4 rows, next 3 for 3 columns.

We connect those 7 pins to the Raspberry Pi cobbler/breadboard on consecutive pins:

P7 P6 P5 P4    P3 P2 P1

If you use a different connection from our regular tcobbler, use the corresponding BCM numbers:

4  25 24  23    22  27  18 (corrected)

(and then IF you also have an original [no mount holes] RPi version, use BCM  21 in lieu of BCM 27)

Fetch the python scripts (python 2.7) from the scripts page as usual.

Emailed notes after class on 3×4 keypad

 

DSCN5518

Class 29: 30 May 2015

TFT-LCD colour 128×128 pixel display 1.44″ on Raspberry Pi

This looks so much more exciting than that 16×2 character-based LCD. This is a great-fun project.

Scripts as usual on the scripts page.

 

 

 

5

Connections LCD — to Raspberry Pi:   (P1 type cobbler number / equivalent BCM number)

  • LED     —   P4 / #23
  • SCK     —   SCLK
  • SDA    —    MOSI
  • A0      —    P3 / #22
  • RESET  —   P1 / #18
  • CS      —    CE0
  • GND   —     GND
  • VCC    —     +5V  **

(**  yes 5V. The “logic” pins work at 3.3V but the power takes 5V !!  A bit unusual, but that’s what it is. And it suits Raspberry Pi perfectly.)

After-class extra notes.

 

Class 30: 6 June

Joystick on Arduino

Connections: (Joystick <—> arduino)

  • Gnd <—> Gnd
  • +5v <—> 5V
  • VRx  <—> A1
  • VRy  <—> A0
  • SW  <—> D8

Output is seen on “serial terminal”.

The script actually has THREE small demos. You will need to edit the reference inside loop() function to reference ONE of demo1(), demo2() or demo3().

Demo3 requires a “serial terminal” with a bit more functionality than Arduino’s inbuilt terminal. Eg GTKTERM on linux or PuTty on windows.