Go to advanced search

by joan
Sun Oct 14, 2012 7:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO Analog pins?
Replies: 46
Views: 127748

Re: GPIO Analog pins?

+-----------gpio4 (LDR_PIN) | +3V3----LDR----+----CAP----GND pinMode(LDR_PIN, OUTPUT); digitalWrite(LDR_PIN, LOW); usleep(5000); pinMode(LDR_PIN, INPUT); delay=pulseIn(LDR_PIN, LOW, 1000000); I assume that setting gpio4 as a low output drains the capacitor to ground voltage. Setting gpio4 as an inp...
by joan
Sun Oct 14, 2012 6:19 pm
Forum: General discussion
Topic: extra RAM
Replies: 119
Views: 26883

Re: extra RAM

That part number is not available at Newark/Element 14. I suppose the U.S. will get them last just like everything else. I hope this is true. I will have to buy at least one. You could try ordering from UK Farnell. If I order from the US (Newark?) US Stock If you choose to order a product from our ...
by joan
Sun Oct 14, 2012 4:21 pm
Forum: C/C++
Topic: Where to get gcc
Replies: 2
Views: 1036

Re: Where to get gcc

It's normally already installed on Linux boxes.

Type

gcc

at the command line.
by joan
Sun Oct 14, 2012 2:54 pm
Forum: Automation, sensing and robotics
Topic: Driving multiple servos from the RaspberryPi
Replies: 212
Views: 116786

Re: Driving multiple servos from the RaspberryPi

Check my post above about gpio-monitor if you don't have a scope.
by joan
Sun Oct 14, 2012 2:45 pm
Forum: General discussion
Topic: extra RAM
Replies: 119
Views: 26883

Re: extra RAM

Just bought one from UK Farnell. Current order status is processing. Hopefully it will update to Complete shortly (do they dispatch on Sundays?)

e-mail confirmation from Farnell

2191863 1 SBC, RASPBERRY PI, MODEL B, 512MB; Silic RASPBRRY-MODB-512M

Estimated delivery 15th October.
by joan
Sun Oct 14, 2012 2:18 pm
Forum: Automation, sensing and robotics
Topic: Driving multiple servos from the RaspberryPi
Replies: 212
Views: 116786

Re: Driving multiple servos from the RaspberryPi

...If you can do all that without any error messages then you should definitely be able to see a continuous servo control pulse on the relevant GPIO pin. In my example I set servo 1, so you'd look for the pulse on GPIO 17 which is P1 pin 11... A side effect of a gpio monitor I wrote to log input le...
by joan
Sun Oct 14, 2012 11:27 am
Forum: Automation, sensing and robotics
Topic: GPIO Data Logger
Replies: 66
Views: 28124

Re: GPIO Data Logger

How are you reaching 50 odd IO? Thought the Pi only had 8 pins for GPIO, or are you using the Gert Board? Cheers Scott See http://elinux.org/Rpi_Low-level_peripherals The Pi has 54 gpio pins of which 17 (gpios 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25) are accessible on P1 and 4 ...
by joan
Sun Oct 14, 2012 10:12 am
Forum: Automation, sensing and robotics
Topic: Driving multiple servos from the RaspberryPi
Replies: 212
Views: 116786

Re: Driving multiple servos from the RaspberryPi

... The readme says "Please read the driver source for more details, such as which GPIO pin maps to which servo number", I am unable to find that info to ensure I am connecting on the right pin so I currently have try them all.... The relevant snippet of code is // Map servo channels to GPIO pins s...
by joan
Sat Oct 13, 2012 11:35 pm
Forum: Automation, sensing and robotics
Topic: GPIO Data Logger
Replies: 66
Views: 28124

Re: GPIO Data Logger

The output will go to the screen by default. For logging you would normally redirect the output to a file. e.g. rather than sudo ./gpio-monitor -m values use sudo ./gpio-monitor -m values >log which would save the output in a file named log. You'd probably direct the output to a screen at first unti...
by joan
Sat Oct 13, 2012 1:54 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Export GPIO failed
Replies: 7
Views: 7423

Re: Export GPIO failed

It's a permissions problem. The redirection (>) is done before the sudo is in effect.

One method.

echo "11" >tmp; sudo cp tmp /sys/class/gpio/export
by joan
Sat Oct 13, 2012 10:17 am
Forum: Automation, sensing and robotics
Topic: GPIO Data Logger
Replies: 66
Views: 28124

Re: GPIO Data Logger

I've massaged the code into shape and it's ok for my needs. Save the code as gpio-monitor.c and build using cc -o gpio-monitor gpio-monitor.c Run using sudo ./gpio-monitor -m gpios_to_monitor -s sample_rate e.g. sudo ./gpio-monitor -m 0-7 -s 100 It's intended to monitor rather than alter states but ...
by joan
Fri Oct 12, 2012 9:58 am
Forum: Automation, sensing and robotics
Topic: Ultra cheap ultrasonics, and a bit of a challenge
Replies: 73
Views: 32240

Re: Ultra cheap ultrasonics, and a bit of a challenge

I believe a 50Hz update rate will be enough to keep it balanced, especially as acoustic outputs seem less susceptible to vibrations compared to inclinometers. It may well be trial and error to tune your system. A PID may well work. Finding the right values may be the more difficult part of the task....
by joan
Thu Oct 11, 2012 1:30 pm
Forum: Automation, sensing and robotics
Topic: Python to Raspberry Pi to Arduino to Motors...
Replies: 5
Views: 4264

Re: Python to Raspberry Pi to Arduino to Motors...

There are different sorts of motors and different sorts of motor drivers. It will be helpful if you could point to the specs of the motors and driver boards you plan to use.
by joan
Thu Oct 11, 2012 11:07 am
Forum: Automation, sensing and robotics
Topic: Python to Raspberry Pi to Arduino to Motors...
Replies: 5
Views: 4264

Re: Python to Raspberry Pi to Arduino to Motors...

You've only posted a snippet of the Arduino sketch which I thought needed to include a setup and a loop. Could you post all the sketch? edited to add: I now see your snippet is in (I guess Python) so I guess is a sort of pseudo code. Why not just copy from one of the example Arduinio skteches for dr...
by joan
Thu Oct 11, 2012 9:13 am
Forum: Automation, sensing and robotics
Topic: Aircraft Noise Detector
Replies: 3
Views: 4632

Re: Aircraft Noise Detector

How do you sense that the noise is over the complaint threshold currently?

If you use some sort of meter it may be possible to grab its output.
by joan
Wed Oct 10, 2012 8:17 pm
Forum: General discussion
Topic: Connecting Raspberry PI to serial UART
Replies: 7
Views: 7445

Re: Connecting Raspberry PI to serial UART

Rather than running the Python code could you do a quick test

stty -F /dev/ttyAMA0 9600
cat /dev/ttyAMA0

You might have to precede each command with sudo depending on the way your permissions are set up.
by joan
Wed Oct 10, 2012 7:38 pm
Forum: General programming discussion
Topic: undefined reference to i2c functions
Replies: 5
Views: 18300

Re: undefined reference to i2c functions

Might be worth checking to see if libi2c-dev is present on your system.

sudo apt-get install libi2c-dev

may be all that you need.
by joan
Wed Oct 10, 2012 4:48 pm
Forum: Beginners
Topic: GNU library
Replies: 11
Views: 1730

Re: GNU library

The Gnu multi-precision library is already installed on my Pi.

Try

sudo apt-get install libgmp-dev

to get the development tools.
by joan
Wed Oct 10, 2012 3:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO Analog pins?
Replies: 46
Views: 127748

Re: GPIO Analog pins?

I am using this technique to measure light levels. It suits my purposes as I can spot the difference between dark, day light and lights on. There is a lot of variation in the reading for all the reasons previously mentioned. A good trick as long as you know the limitations and aren't expecting a hu...
by joan
Wed Oct 10, 2012 11:11 am
Forum: Automation, sensing and robotics
Topic: GPIO Data Logger
Replies: 66
Views: 28124

Re: GPIO Data Logger

No problem. I've been sidetracked so have only done a little more. I'll probably have time to tidy up the code by the time you assemble your parts.
by joan
Wed Oct 10, 2012 11:05 am
Forum: Automation, sensing and robotics
Topic: Ultra cheap ultrasonics, and a bit of a challenge
Replies: 73
Views: 32240

Re: Ultra cheap ultrasonics, and a bit of a challenge

Thanks for your answer. I can't say I fully understand but I'm certainly getting closer. :D
by joan
Tue Oct 09, 2012 9:20 pm
Forum: Automation, sensing and robotics
Topic: Ultra cheap ultrasonics, and a bit of a challenge
Replies: 73
Views: 32240

Re: Ultra cheap ultrasonics, and a bit of a challenge

Excellent. I think the physics of sound waves rather limits the update rate of acoustic sensors. If you had some more they'd probably interfere with each other. I think you'd have one transmitter and the rest would be passive listeners. Given what you have achieved do you now think it possible to ex...
by joan
Tue Oct 09, 2012 8:54 pm
Forum: HATs and other add-ons
Topic: Driving Arduino motor shield from Pi
Replies: 43
Views: 43222

Re: Driving Arduino motor shield from Pi

I rejigged the Arduino software to use Gordon's WiringPi library, used 6 gpio lines for control, and I can now drive (4) DC motors backwards/forwards with variable speed. Very interested in this, can you elaborate on what you have done exactly? It's all quite new to me so what you wrote is not all ...
by joan
Tue Oct 09, 2012 8:40 pm
Forum: HATs and other add-ons
Topic: Driving Arduino motor shield from Pi
Replies: 43
Views: 43222

Re: Driving Arduino motor shield from Pi

BBsan2k wrote:Sorry for bringing this up again,
but isn't there a problem using 3.3V Raspberry Pi? How did you manage to controll the motor shield?
I didn't have any problems with the signal levels. I suppose a 3.3V low is pretty much the same as a 5V low and a 3.3V high is high enough to count as a 5V high.

Go to advanced search