Go to advanced search

by richrarobi
Tue Oct 18, 2016 11:39 am
Forum: Other programming languages
Topic: Portable GUI C89 Programming.
Replies: 145
Views: 21270

Re: Portable GUI C89 Programming.

This is in response to a couple of people that keep pushing the fallacy that using a tool-kit always saves time. Simply not true, now using wrappers does save time, as does keeping GUI function code libraries. define "Always". :| Are you (any of) applying KISS "top down" or "bottom up"? :oops: :uge...
by richrarobi
Tue Oct 18, 2016 11:18 am
Forum: Other programming languages
Topic: Scala
Replies: 2
Views: 1799

Re: Scala

I am really surprised no-one answered this post in three years! Are you getting anywhere with Scala? I like Scala. I spent a lot of time looking for the best language for me. I much prefer the layout style used by Scala, as opposed to the indent style used by Python. I used Java before, but didn't l...
by richrarobi
Mon Oct 17, 2016 6:16 pm
Forum: Python
Topic: Installing modules in Python 3-- Raspbian
Replies: 8
Views: 2811

Re: Installing modules in Python 3-- Raspbian

You probably need sudo in front of your command - gives the command supervisor rights. Have a look at some of the articles in the back issues of MagPi magazine...... Note that sudo should be used with care, on Raspbian it is enabled without password (for convenience, whereas most Unix type systems w...
by richrarobi
Mon Oct 17, 2016 9:29 am
Forum: General programming discussion
Topic: CrossCompile Host=RISC OS Target=Linux?
Replies: 25
Views: 3012

Re: CrossCompile Host=RISC OS Target=Linux?

I have found if I am trying to actually get something done it is best to use RISC OS. Conversely, (and not an answer or trying to divert you) I would be interested to know what it is that causes this phenomenon of enhanced productivity? Can you identify what causes it? Would there be any mileage in...
by richrarobi
Sun Oct 16, 2016 11:48 am
Forum: Automation, sensing and robotics
Topic: problem in using Arduino as a sensor for Pi
Replies: 9
Views: 1784

Re: problem in using Arduino as a sensor for Pi

Do the tasks, you wish to run, work as separate programs?

If you really want to run them from one program at the same time, you probably need threading or (preferably) multiprocessing.
by richrarobi
Sun Oct 16, 2016 10:32 am
Forum: Python
Topic: Bug with GPIO.pwm and threads
Replies: 6
Views: 1353

Re: Bug with GPIO.pwm and threads

Can you try this with python 3: #!/usr/bin/python3 import multiprocessing import RPi.GPIO as GPIO from time import * GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) debug = 1 # Variables moteur GPIO_SensH = 17 GPIO_SensAH = 27 GPIO_Marche = 18 # Variables encodeur GPIO_Bouton = 26 # SW, 3.3v -> repos...
by richrarobi
Sun Oct 16, 2016 8:57 am
Forum: Python
Topic: Bug with GPIO.pwm and threads
Replies: 6
Views: 1353

Re: Bug with GPIO.pwm and threads

As in your other post of the same subject, I am fairly sure that your problem is of context. Processes are spawned / forked, etc with the environment, BUT that doesn't mean that the information you set up is copied across. You have to think of the processes as though they are copies on another syste...
by richrarobi
Sat Oct 15, 2016 8:35 pm
Forum: Python
Topic: Multiprocessing.process RPi.GPIO.PWM
Replies: 2
Views: 1035

Re: Multiprocessing.process RPi.GPIO.PWM

This may or not be relevant, but it could be a "context issue" - try with all your GPIO and other relevant configuration code inside the multiprocessed task. (Context issue - as in what parts of the main program get passed over into the subtasks) e.g. code such as the following maybe? import RPi.GPI...
by richrarobi
Fri Oct 07, 2016 5:38 pm
Forum: General programming discussion
Topic: Passing Data and Commands between programs
Replies: 24
Views: 5979

Re: Passing Data and Commands between programs

David, Are you really suggesting that people researching such things as: e.g. swarm robotics https://en.wikipedia.org/wiki/Swarm_robotics should eschew the excellent third party tools such as mqtt and zmq, and all the facilities included therein, in order to avoid adding another layer to the computi...
by richrarobi
Thu Sep 29, 2016 3:02 pm
Forum: Networking and servers
Topic: Pi to Pi communication via ip network
Replies: 2
Views: 582

Re: Pi to Pi communication via ip network

You should look at existing higher level message handling libraries. MQTT, ZMQ, etc then you can spend more time thinking about what you want to communicate. My favourite is ZMQ because it does not need a message broker. (I also like the RPC style of communicating....Each system can perform commands...
by richrarobi
Fri Sep 16, 2016 8:35 am
Forum: Astro Pi
Topic: Humidity accuracy
Replies: 7
Views: 1826

Re: Humidity accuracy

Thanks!!! Just proves that everything in computing ( everything else ?) is knowing what question and who to ask.....found these.... http://www.cigarsinternational.com/cigar-101/article/29/salt-test https://ambientweather.wikispaces.com/Humidity+Calibration%2C+Saturated+Salt+Test?responseToken=0db4f1...
by richrarobi
Thu Sep 15, 2016 10:47 am
Forum: Astro Pi
Topic: Humidity accuracy
Replies: 7
Views: 1826

Re: Humidity accuracy

Wow! Thanks for your answers, There is a lot to take in.... maybe a short delay while my brain warms up....
by richrarobi
Thu Sep 15, 2016 8:10 am
Forum: Astro Pi
Topic: Humidity accuracy
Replies: 7
Views: 1826

Humidity accuracy

I have seen lots of posts and advice over Temperature accuracy, I have my sensehat on a ribbon cable extension.... I have some reason to suspect that my humidity reading is too high. Around 15%. However I cannot prove it. I have cheap humidity instruments to compare the values, but they can't agree,...
by richrarobi
Thu Sep 15, 2016 7:18 am
Forum: General programming discussion
Topic: Passing Data and Commands between programs
Replies: 24
Views: 5979

Re: Passing Data and Commands between programs

I did a search for RPC style solutions. Apparently : MQTT is a PUB/SUB system and doesn't lend itself well to RPC. While you could possibly shoehorn something on top of MQTT to simulate the synchronicity required, you are probably better off looking for a system which provides real RPC semantics. I ...
by richrarobi
Tue Sep 06, 2016 6:26 pm
Forum: General programming discussion
Topic: Passing Data and Commands between programs
Replies: 24
Views: 5979

Re: Passing Data and Commands between programs

here is my simple/compact (almost) understandable rpc system using zmq:- reply server to run on each "server" (note I use Python 3.4):- #!/usr/bin/python3 # Filename: zrep.py # from time import sleep import pickle import zmq import zlocal import importlib class Reply: def __init__(self): self.functi...
by richrarobi
Sat Aug 27, 2016 9:07 pm
Forum: Beginners
Topic: simple sdr on RPi3?
Replies: 22
Views: 37023

Re: simple sdr on RPi3?

by richrarobi
Sat Aug 27, 2016 8:58 pm
Forum: General programming discussion
Topic: Passing Data and Commands between programs
Replies: 24
Views: 5979

Re: Passing Data and Commands between programs

I liked mqtt, but not the need for a broker. Have returned to zmq after not liking that thefirst time round. Wrote python classes libraries for Req/Reply and Pub/Sub that I can use thru' multiprocessing Python 3.4 without rewriting code on each machine. I very much like zmq in that that I can update...
by richrarobi
Thu Aug 18, 2016 7:38 pm
Forum: Other projects
Topic: Raspberry Pi Cluster
Replies: 10
Views: 4273

Re: Raspberry Pi Cluster

I combined the RPC client and server code in a single python program. This means that each system can use the same "core" code. The code also runs local multiprocessed functions, so that the served code and multiprocessed functions can use the same "lock". Not good if the "server" at the other end i...
by richrarobi
Sat Aug 13, 2016 9:09 am
Forum: Other projects
Topic: Raspberry Pi Cluster
Replies: 10
Views: 4273

Re: Raspberry Pi Cluster

And if you really want to you can use the method to drive multiple pi's with your choice of mathematical puzzle (nth degree of pi, etc) RichR p.s. I must add that Pi's are ideal for this sort of lab environment use, where you can build a cluster or distributed environment without spending an absolut...
by richrarobi
Sat Aug 13, 2016 9:02 am
Forum: Other projects
Topic: Raspberry Pi Cluster
Replies: 10
Views: 4273

Re: Raspberry Pi Cluster

"Everyone" wants a cluster ...ok if you are running a data-centre with a specific range of tediously repeated functions..... For today's ever decreasing size of processors used as increasingly discrete purpose. (i.e. controlling the foot or hand of a robot?), the future (for me) is obviously in netw...
by richrarobi
Fri Aug 12, 2016 9:43 pm
Forum: Python
Topic: About Python
Replies: 8
Views: 1385

Re: About Python

Multiprocessing is tremendous FUN, and properly written, even in Python, you could write that program and still have most of your 4 cores available for other work. With multiprocessing you can also do RPC between systems, all / both of them sitting mostly idle. Counters use up processor time, better...
by richrarobi
Mon Jul 25, 2016 6:55 pm
Forum: Beginners
Topic: cluster
Replies: 7
Views: 1613

Re: cluster

So, I just wondered if I could combine remote procedure calls to other pi systems with multiprocessing. (Python 3.4) Here it is... main line module name: __main__ parent process: 5151 process id: 5156 function f module name: __main__ parent process: 5156 process id: 5159 c = 1, hello bob Bearing fro...
by richrarobi
Sun Jul 24, 2016 7:31 am
Forum: Beginners
Topic: cluster
Replies: 7
Views: 1613

Re: cluster

Be careful around around this asyncio coroutine stuff, I would suggest following along the progress of enhancements in https://www.python.org/. Some of it is still being refined. Looks very interesting, though.

https://en.wikipedia.org/wiki/Coroutine
by richrarobi
Fri Jul 22, 2016 5:15 pm
Forum: Beginners
Topic: cluster
Replies: 7
Views: 1613

Re: cluster

At the risk of sounding repetitive, I thought there might be some interest in another alternative approach. I was researching RPC alternatives, decided I wanted to use RPC via zeromq (which unlike other messaging systems doesn't require a broker ) After lots of searching I found aiozmq.rpc via async...
by richrarobi
Fri Jul 15, 2016 7:56 pm
Forum: General programming discussion
Topic: What programming language to use
Replies: 103
Views: 21430

Re: What programming language to use

Ontological parsimony!

forth go topspeed, alice pure yorick, smalltalk signal revolution.
senseTalk PIKT nice lingo

As long as HEATER is always right we can all be happy.
Calm observation vs tirade of rhetoric? Calm down man.
Some of us just don't LIKE javascript.

Go to advanced search