Plumbing the Arduino Adam Sampson University of Kent (and a cast - - PowerPoint PPT Presentation

plumbing the arduino
SMART_READER_LITE
LIVE PREVIEW

Plumbing the Arduino Adam Sampson University of Kent (and a cast - - PowerPoint PPT Presentation

Plumbing the Arduino Adam Sampson University of Kent (and a cast of thousands, including Matt Jadud, Christian Jacobsen, Omer Kilic, Carl Ritson...) A brief history lesson In the 1980s, INMOS created the Transputer and an unusual


slide-1
SLIDE 1

Plumbing the Arduino

Adam Sampson

University of Kent (and a cast of thousands, including Matt Jadud, Christian Jacobsen, Omer Kilic, Carl Ritson...)

slide-2
SLIDE 2

A brief history lesson

  • In the 1980s, INMOS created the Transputer
  • … and an unusual programming language, called
  • ccam
  • Further developed at Kent in the 1990s and

2000s: occam-pi

  • Here's what it looks like...
slide-3
SLIDE 3

C++: doThing(); doOtherThing();

  • ccam:

SEQ doThing() doOtherThing()

slide-4
SLIDE 4

PROC main () WHILE TRUE SEQ digitalWrite (13, HIGH) delay (200) digitalWrite (13, LOW) delay (200) :

slide-5
SLIDE 5

PROC blink (VAL INT pin, period) WHILE TRUE SEQ digitalWrite (pin, HIGH) delay (period) digitalWrite (pin, LOW) delay (period) : PROC main () blink (13, 200) :

slide-6
SLIDE 6

PROC main () blink (13, 200) :

slide-7
SLIDE 7
slide-8
SLIDE 8
  • ccam:

PAR x y C++: ??!?!!!?

slide-9
SLIDE 9

PROC main () PAR blink (13, 300) blink (14, 500) :

slide-10
SLIDE 10
slide-11
SLIDE 11

This is a channel.

slide-12
SLIDE 12

sender receiver

slide-13
SLIDE 13

inputPin

  • utputPin
slide-14
SLIDE 14

inputPin

  • utputPin

invert

slide-15
SLIDE 15

Concurrency in action

  • We call this “process-oriented programming”
  • Build your program out of little, isolated

components, and connect them together

  • Plumbing is a library of ready-made components

(like inputPin, invert and blink) for the Arduino

slide-16
SLIDE 16

64 LEDs (well, 128, actually...)

slide-17
SLIDE 17

One

slide-18
SLIDE 18

How does that work?

buffer buffer buffer buffer ...

slide-19
SLIDE 19

How does that work?

buffer buffer buffer buffer ... column column column column ...

slide-20
SLIDE 20

How does that work?

buffer buffer buffer buffer ... column column column column ... source black. hole

slide-21
SLIDE 21
slide-22
SLIDE 22

Distributed embedded system

buffer buffer buffer buffer ... column column column column ... source black. hole

slide-23
SLIDE 23

First node

buffer buffer buffer buffer ... column column column column ... source serial.tx serial.tx

slide-24
SLIDE 24

Other nodes

buffer buffer buffer buffer ... column column column column ... serial.rx serial.tx serial.tx

slide-25
SLIDE 25
slide-26
SLIDE 26
slide-27
SLIDE 27
slide-28
SLIDE 28
slide-29
SLIDE 29

The RepRap

  • X, Y and Z axes with steppers and endstops
  • Print head with heater, temperature sensor and

extruder motor

  • Serial interface to accept commands from a host

computer

slide-30
SLIDE 30

Plumbing the RepRap

serial.port temp. sensor heater thermostat command.parser motor. control motor endstop motor. control motor endstop motor. control motor endstop motor. control motor endstop motor. control motor endstop axis. control motor endstop x y z extruder

slide-31
SLIDE 31

How do I learn more?

  • Read the book!
  • Available from our web site

along with the software (all

  • pen source):

http://concurrency.cc/

  • For more about occam-pi:

http://occam-pi.org/

  • Thanks – any questions?