On Fri, 29 Sep 2017 16:34:18 +0200, Axel Berger
declaimed the following:
>This leads to two questions: What programming language should I use? I
>haven't done any real programming in ages and the languages I used to
>know are obsolete. I have done (or rather used) a simple test routine
>for my solenoid output card in python, which seems to be the accepted
>standard for the pi, but I don't like it. Are there any better
>alternatives (except c, which I hate)?
>
Given that the "Pi" part of the name purportedly derives from "Python"
as the target language (for a learning environment), and that you likely
don't need the fastest response times, Python is likely the easiest
language to use (especially as the R-Pi has a dedicated I/O library for
Python).
I don't know if there is anything for the R-Pi equivalent to the
BeagleBone "bonescript" (node.js Javascript with a library to access the
BBB I/O pins).
>The second problem is hardware. The ducts leading to my current
>thermostats are strictly a star configuration, so one wire is not the
>obvious choice. What ohter kinds of sensors are there and how can I
>connect at least 8 to the Pi? Part of the GPIO, 8 output pins, is
>already taken by the solenoid card.
>
If the chosen sensors use chip-select signals, you might be able to use
a serial->parallel shift register (74HC595). You'd send (serial -- one pin)
the correct byte pattern to select one of the eight sensors (if active
high: 1, 2, 4, 8, 16, 32, 64, 128; active low would be complementary bits).
After latching the data (another pin, I suspect) you would then
send/receive command/data on the shared sensor pins. Repeat for each
sensor, then "zero" the shift register to deselect all sensors. {Note:
74HC595 can, as I recall, be daisy-chained, so more than 8 "selects" could
be used}
>Danke
> Axel
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|