Smalltalk

Doing some basic tasks with Squeak Smalltalk virtual machine on BeagleBone

Smalltalk

Posted by Angel on 2014-05-01T23:24:09-04:00

Updated instructions for running Squeak on BeagleBone Black Debian images:

  1. apt-get install squeak-vm unzip
  2. wget http://squeakvm.org/unix/release/Squeak4.2-10966.zip
  3. unzip Squeak4.2-10966.zip
  4. squeak Squeak4.2-10966.image &

Code for demo:

graph1 := GraphMorph new.
graph1 openInWorld.
graph1 extent: 700@500.
graph1 clear.

analog1 := FileStream readOnlyFileNamed: '/sys/devices/ocp.3/helper.15/AIN0'.

[1000 timesRepeat: [
	| lightValue |
	lightValue := (analog1 contents) asInteger.
	graph1 appendValue: lightValue.
	(Delay forMilliseconds: 20) wait.
	]] fork.

Comments are not currently available for this post.