Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on...
Transcript of Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on...
![Page 1: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/1.jpg)
Controlling Machines with Smalltalk on Raspberry Pi
ESUG 2016 Georg Heeg eK
Georg Heeg & Karsten Kusche
![Page 2: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/2.jpg)
Motivation
![Page 3: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/3.jpg)
Mundartenstation(Station of German Dialects)
• Button to start / stop playback
• LED to indicate playback
• MP3 support
• configuration via CSV-Files
![Page 4: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/4.jpg)
Raspberry Pi 900Mhz Quad-Core ARMv7 @ 1GB RAM
HDMI
USB
Ethernet
26 GPIOs + Power + Ground
![Page 5: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/5.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 6: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/6.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 7: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/7.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 8: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/8.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 9: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/9.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 10: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/10.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 11: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/11.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 12: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/12.jpg)
Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
![Page 13: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/13.jpg)
LED Matrix Circuit• How to connect 84 Buttons
and LEDs to 27 GPIOs?
• 84 Buttons = 7 rows x 12 cols
• = on
• = off
• = in
• = out
r1
r2
r3
r4
c1 c2 c3 c4
x
x
x
x
L1 L2 L3 L4
![Page 14: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/14.jpg)
Hardware Assembly
![Page 15: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/15.jpg)
Hardware Assembly
![Page 16: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/16.jpg)
GPIO Access
• sysfs in Kernel via /sys/class/gpio
![Page 17: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/17.jpg)
How to program the Raspberry Pi?
• Cincom® is Cosponsor of Erlebniswelt Deutsche Sprache
• Initial Port of VisualWorks® VM within 5 Days
![Page 18: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/18.jpg)
VisualWorksGPIO
GPIO
GPIO
Matrix Button System
Sound System
4 @ 2
on
off
![Page 19: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/19.jpg)
VisualWorksGPIO
GPIO
GPIO
Matrix Button System
Sound System 4 @ 2
on
off
LEDSound System
Matrix LED
System GPIO
![Page 20: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/20.jpg)
Sound System1. Wait for Any Button-Press
2. Play Track
3. Wait for Button-Release
4. Wait for End of Track or Same Button-Press
5. Wait for Button-Release
6. Repeat
![Page 21: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/21.jpg)
Testing on WindowsGPIO
GPIO
GPIO
Matrix Button System
Sound System
Dummy Objects
![Page 22: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/22.jpg)
Developer Tools
![Page 23: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/23.jpg)
Developer Tools
![Page 24: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/24.jpg)
Home Automationthe Heeg way
Home Automotion
![Page 25: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/25.jpg)
Kitchen Lift
![Page 26: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/26.jpg)
The LiftMotor with Windlass
Top Contact
Door Contact 1
Controls
Door Contact 2
Bottom Contact
🍵🍺
![Page 27: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/27.jpg)
Connecting 220V
• Relays to switch via GPIO • Contactor to switch Motor • Relay switches Contactor
![Page 28: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/28.jpg)
Hardware Assembly
![Page 29: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/29.jpg)
Hardware Assembly
![Page 30: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/30.jpg)
Hardware Assembly
![Page 31: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/31.jpg)
Hardware Assembly
![Page 32: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/32.jpg)
Software ModelGPIO
GPIO
GPIO
Motor Control
Lift
up/down stop
Relay Array
Conductor Array
Single-Phase
AC Motor
Trigger Button
GPIOSensor Button
![Page 33: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/33.jpg)
5 Software Rules• Door open ➟ Stop
• Driving Up ∧ Top Contact ➟ Stop
• Driving Down ∧ Bottom Contact ➟ Stop
• ¬ Driving ∧ ¬ Bottom Contact ∧ Control Down ➟ Drive Down
• ¬ Driving ∧ ¬ Top Contact ∧ Control Up ➟ Drive Up
![Page 34: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/34.jpg)
Demo• Controlling the Lift from a Workspace
• Using Model Objects for Buttons
![Page 35: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/35.jpg)
![Page 36: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/36.jpg)
Maintenance
• X11 via SSH
• basically unnecessary
• runs since October
• daily use
![Page 37: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/37.jpg)
Beaglebone Black
![Page 38: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/38.jpg)
Virtualization LayerGPIO1
GPIO2
GPIO3
Matrix Button System
vGPIO1
vGPIO2
vGPIO3
![Page 39: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/39.jpg)
Availability• 32bit Linux ARM VM
• available since August 19th, 2016
• through Cincom Smalltalk Developer Program
• Smalltalk GPIO Access
• to be determined
![Page 40: Controlling Machines with Smalltalk on Raspberry Pi€¦ · Controlling Machines with Smalltalk on Raspberry Pi ESUG 2016 Georg Heeg eK Georg Heeg & Karsten Kusche. Motivation. ...](https://reader033.fdocuments.us/reader033/viewer/2022050504/5f95cdb3daacee0e487ee396/html5/thumbnails/40.jpg)
SummaryConnecting Hardware to Smalltalk was never more fun