Thank you, Allex, for your comments. When time permits, I will separate the
issues into different posts.
As a first step I have put code for two devices on Github:
- https://github.com/robvanlopik/PCA9685-PWMExpander
- https://github.com/robvanlopik/DS1307-TinyRTC
While working on the PWM module, it occurred to me that PharoThings has two
different points of view. The first I would call "board-centric", where we
tell the board what to do with its pins. That is also the way my
PotPCA9685Device works. On the other hand there is the "pin-centric" view
where pins have functions and are told what to do. This view is used in the
inspectors. As the outputs of the PCA9685 look very much like GPIO pins, I
wondered whether it would be worthwhile to model them as such. This doesn't
seem possible in a direct way, so it would need the introduction of a
PotBoardExpander. Maybe PotBoardConnector could be adapted for this
purpose, but I think it should be something different.
This reasoning also stems from my feeling that the Arduino is not really a
PotBoard. For one thing, there is no reason why it would have to be a
singleton; I can attach Arduinos through numerous serial and USB ports (and
Bluetooth). On the other hand it would very well fit the description of a
PotBoardExpander. In that case PotBoard should have a superclass
PotController that allows for having no pins of its own.. so any computer
can control one or more Arduinos (To be precise, by "Arduino" I mean a
Arduino-like board running the Firmata sketch and communicating through the
Firmata protocol).
The reason one would want to do this, is to have a uniform way of
controlling pins, irrespective of board or device. Maybe this uniformity
can also be achieved by implementing the protocol of PotBoardDriver for any
device that has GPIO-like pins.
I have not been able to find a description of the design of PharoThings,
but maybe someone wants to comment on these thoughts.
In the meantime I will start looking at Firmata.
cheers,
Rob van Lopik
Hello all,
since last summer I have been looking at Pharo-IoT. I am not new to
Smalltalk (from Digitalk, Dolphin to Squeak on my first Pi, using the VM
that came with Scratch) but not a professional. I run Pharo directly on
the Pi as the Pi3B+ and Pi4 are fast enough to give a reasonable user
experience (using VNC). In that way I also can use diverse utilities and
Python to control the GPIO's.
In the meantime I have written some code for the DS1307 real time clock,
and for the PCA9685 PWM/Servo port expander.
I want to put these on Github, but now I run into the problem that
Iceberg doesn't run on the Pi because of a missing libgit2.so. How do
you solve this problem? Just put up .st files (classic st or tonel?).
Other questions that have arisen:
What about Pharo version 8? It seems to run on the Pi (after tricking it
by putting a symlink libgit2.so in the VM directory), but when I tried
to load IoT in an 32 bits image on Windows I got lots of errors stemming
from Calypso. Is somebody working on this?
I am also interested in Arduino. There is some support for it, but it
doesn't seem complete. Furthermore I would like to use different kind of
Arduino-like boards. Again, is somebody working on this? If not, I could
take this up. Maybe including "configurable Firmata".
It looks like I will have some spare time for the next months (locked up
due to Corona restrictions) and I would like to contribute something
useful and not duplicate work other people are doing.
Please let me know of your ideas.
Rob van Lopik
--
This email has been checked for viruses by AVG.
https://www.avg.com