Go to advanced search

by richrarobi
Thu Nov 24, 2016 11:24 pm
Forum: Automation, sensing and robotics
Topic: Data acquisition system project
Replies: 8
Views: 2304

Re: Data acquisition system project

This might help: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=13883 Also this is interesting reading: https://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi/overview or: http://www.raspberrypi-spy.co.uk/2013/10/analogue-sensors-on-the-raspberry-p...
by richrarobi
Thu Nov 24, 2016 10:41 pm
Forum: Beginners
Topic: Start Application via SSH?
Replies: 25
Views: 8056

Re: Start Application via SSH?

Assuming you ran ssh from a system running X, (rather than one of those M$ thingies) as in this example from my Linux Mint to pi system a:- ssh -l pi -Y a.local the -Y is important (or use -X) note the uppercase. See https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=11833&p=728951&hilit=pcmanf...
by richrarobi
Thu Nov 24, 2016 9:22 pm
Forum: Python
Topic: returning value from python to php
Replies: 5
Views: 4046

Re: returning value from python to php

may not be relevant, but fom a quick google.....
Make sure PHP has permission to excecute that file.
by richrarobi
Mon Nov 21, 2016 4:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using an Arduino as a slave I/O board
Replies: 147
Views: 138500

Re: Using an Arduino as a slave I/O board

Quite by chance, I found this:-
http://projectpi.org.uk/tag/nanpy/
There is an example of analogue write in the first section of code. NB, though, that this all uses an old version of Nanpy.
RichR
by richrarobi
Sat Nov 19, 2016 9:31 pm
Forum: Python
Topic: Interrupt to count pulses on gpio pin every x seconds
Replies: 4
Views: 10162

Re: Interrupt to count pulses on gpio pin every x seconds

It's a bit difficult to read your code because it isn't in a "code" block - notice that joan's post did this and it has all the indentation replicated. However:- You are using threading. If you were to switch to multiprocessing, you would have each process running in its own process and able to run ...
by richrarobi
Mon Nov 14, 2016 7:56 pm
Forum: Python
Topic: Using Raspberry Pi for Stepper Motor with Motor HAT
Replies: 1
Views: 595

Re: Using Raspberry Pi for Stepper Motor with Motor HAT

From a g**gle, it appears that with a basic stepper motor it isn't possible. You need some kind of extra physical end-stop (end of carriage on a plotter, or 3d printer?) . Suggestion is to count the steps and return to that point. Not perfect, but seems that's it. This might help: http://www.explain...
by richrarobi
Sun Nov 13, 2016 12:47 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Interfacing Raspberry Pi with Arduino and power safety
Replies: 7
Views: 1448

Re: Interfacing Raspberry Pi with Arduino and power safety

I don't think it is totally a good idea to power your arduino's from the pi - if you start driving things off th arduino's the power drain will mount up. You should consider separate power direct to the power ports of those arduino boards. Maybe a powered usb hub would be enough to isolate the pi ? ...
by richrarobi
Sun Nov 13, 2016 12:33 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Using an Arduino as a slave I/O board
Replies: 147
Views: 138500

Re: Using an Arduino as a slave I/O board

I haven't looked at nanpy (or arduino) for a while - they aren't very good at documenting their interface (API) - They seem to think we are telepathic - Anyway after half an hour I found this - https://github.com/nanpy/nanpy/blob/master/nanpy/arduinoapi.py line 29 hints at the answer - analogRead - ...
by richrarobi
Sat Nov 12, 2016 9:53 pm
Forum: HATs and other add-ons
Topic: dab radio module
Replies: 6
Views: 35177

Re: dab radio module

To add to the previous note, there is a guide for installation of SDR-J on the pi :
http://www.michaelcarden.net/

It works, after some fiddling with the config file - read the comments on the post.

p.s. It is suggested that at least a PI2 is needed.
by richrarobi
Sat Nov 12, 2016 6:12 pm
Forum: Networking and servers
Topic: Connecting Pi's
Replies: 2
Views: 695

Re: Connecting Pi's

Static ip's can be a pain in the..... Another way to go might be to use avahi .... from one pi to another, or from any system supporting bonjour/avahi to another (i.e. I use Ubuntu Linux) ssh -l pi -Y d.local where d is the name of the connected host, Note the .local once you have connected using th...
by richrarobi
Sat Nov 12, 2016 5:26 pm
Forum: Automation, sensing and robotics
Topic: I am trying to Use an Arduino as a Slave with Python
Replies: 1
Views: 325

Re: I am trying to Use an Arduino as a Slave with Python

probably worth looking at this thread:- https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=46881&p=839460&hilit=nanpy#p839460 To begin with consder the pi as the pc in control of the arduino.. i.e. install the arduino software on pi. sudo apt-get install arduino After trying some sketches (to c...
by richrarobi
Fri Nov 11, 2016 10:30 pm
Forum: Python
Topic: Timer problem
Replies: 3
Views: 981

Re: Timer problem

Single threaded, i.e. sequential operation.
You need to investigate threading or multiprocessing so that your timed code can run separately.
by richrarobi
Fri Nov 11, 2016 8:22 pm
Forum: Troubleshooting
Topic: Espeak error with USB Del Soundbar (but Youtube sound works)
Replies: 5
Views: 1187

Re: Espeak error with USB Del Soundbar (but Youtube sound wo

Not sure exactly of the whole answer.... I set up espeak on a pi2, and had all those messages, and sound didn't work. Found a note somewhere that PulseAudio was the CAUSE, solution was to remove PulseAudio (sudo apt-get remove PulseAudio). It still didn't work. I tried espeak on a B+ that I knew had...
by richrarobi
Tue Nov 08, 2016 7:24 pm
Forum: General discussion
Topic: Raspberry pi cluster
Replies: 14
Views: 2342

Re: Raspberry pi cluster

Sorry, missed that second link, 'cos I didn't read it (I worked with (VAX) clusters (many) years ago and won't go there agin... Wasn't disagreeing with your sentiment, just that I think that there are so many confused people about .... They seem to get so excited about clusters and they don't know j...
by richrarobi
Tue Nov 08, 2016 6:40 pm
Forum: General discussion
Topic: Raspberry pi cluster
Replies: 14
Views: 2342

Re: Raspberry pi cluster

Clusters are a great way to learn about Distributed Computing, it will not become a Super RPi.... I don't think fruitoftheloom entirely intended the 'Distributed' in the statement above. Apart from that one word I totally agree..... However, Distributed Computing is what many of the fun things in I...
by richrarobi
Sun Nov 06, 2016 10:24 am
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2056

Re: Conversion python 2 to 3.4

This might help (from a quick Google) http://stackoverflow.com/questions/4960048/python-3-and-mysql Stick at it, Python2 is fading (slowly, but it has an end of life plan, I believe) Python3 is better documented, etc, etc. I decided to use python3 throughout, sometimes it is quite frustrating that c...
by richrarobi
Sun Nov 06, 2016 9:32 am
Forum: Troubleshooting
Topic: Connecting a PI with two Arduino's
Replies: 5
Views: 1110

Re: Connecting a PI with two Arduino's

The serial port (two pins on gpio) should work as a second connection - this post has some info (around nanpy and arduino and serial ports) (but be careful of voltage differences)
viewtopic.php?f=44&t=46881&p=839460&hilit=nanpy#p839460
by richrarobi
Thu Nov 03, 2016 11:50 pm
Forum: Python
Topic: executing python sw on RPI from python sw on PC
Replies: 1
Views: 510

Re: executing python sw on RPI from python sw on PC

Ideally, use RPC see viewtopic.php?f=31&t=123977&p=1029741#p1029741

You might find that calling the other system using SSH works for you.
by richrarobi
Thu Nov 03, 2016 11:41 pm
Forum: Python
Topic: Sunrise and Sunset calculation in Python
Replies: 4
Views: 6840

Re: Sunrise and Sunset calculation in Python

Had the same problem, found this treasure: http://pythonhosted.org/astral/
Works for me ...
Any use?
by richrarobi
Tue Oct 25, 2016 7:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Connect two Pi's via GPIO ?
Replies: 9
Views: 2275

Re: Connect two Pi's via GPIO ?

What is it about networking you think is unreliable?
Seems like a shame not to use the best components that are designed for the job?
by richrarobi
Sat Oct 22, 2016 6:52 pm
Forum: Python
Topic: reading directory from pc on rpi with python
Replies: 7
Views: 1469

Re: reading directory from pc on rpi with python

I want to write a program in Python to start activity (a measurement) on the RPI and retrieving the data, stored in the RPI, to my PC. You might find what you need in something like mqtt, or zeromq - messaging solutions. What you describe does tend to look like you need an RPC style answer (or even...
by richrarobi
Wed Oct 19, 2016 12:31 am
Forum: Other programming languages
Topic: Portable GUI C89 Programming.
Replies: 145
Views: 22727

Re: Portable GUI C89 Programming.

Times have definitely changed, however I believe the (defence) industry had a core of knowledgeable programmers, also...Two sides to every fence...Nothing personal... and we were getting along so well... deleted CV....Official secrets....18 yrs at Ferranti.... In those Ferranti Computer Systems days...
by richrarobi
Tue Oct 18, 2016 10:26 pm
Forum: Other programming languages
Topic: Portable GUI C89 Programming.
Replies: 145
Views: 22727

Re: Portable GUI C89 Programming.

I don't (normally) get into C, but I did wonder if the columns could look better!! As for KISS, I guess we can :oops: say goodnight to that (to put it more politely than I first typed . . . ) For my mind, if you (or even I) can't read it without a code book (aka Bletchley Park) - it isn't good code....
by richrarobi
Tue Oct 18, 2016 9:33 pm
Forum: Other programming languages
Topic: Portable GUI C89 Programming.
Replies: 145
Views: 22727

Re: Portable GUI C89 Programming.

Although with my simpler mind I would prefer the following test line :

Code: Select all

if (c % 8 == 0)
(it does maybe need cnt to be +1)
p.s. My compiler seems to prefer c to be an int for the printf statements....
p.p.s. Does the original "design" intend the stray '0' at the start of the column?

:|

Go to advanced search