Go to advanced search

by Richard-TX
Tue Jan 13, 2015 2:44 pm
Forum: C/C++
Topic: I2C c++ PCA9685 servo control issue
Replies: 9
Views: 9830

Re: I2C c++ PCA9685 servo control issue

I am using several PCA9685 on multiple Pis without issue. What I like about it is the resolution and number of channels available. It is hard to beat 4096 steps of resolution.. I use the Adafruit library most of the time and found it to be reliable and stable. The only problem with the Adafruit libr...
by Richard-TX
Sat Jan 10, 2015 6:09 pm
Forum: Networking and servers
Topic: Send email to raspberry pi to do tasks
Replies: 26
Views: 20717

Re: Send email to raspberry pi to do tasks

I just grabbed a spare pi that I have exim installed on and created a .forward file for the user "pi" in it says this: | /home/pi/myscript then I created a script in pi's home dir that says this: #!/bin/sh cat >> /tmp/pi-msg date >> /tmp/msgdate Then I made the script executable chmod 755 /home/pi/m...
by Richard-TX
Sat Jan 10, 2015 5:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c to other i2c's xda xcl
Replies: 9
Views: 2103

Re: i2c to other i2c's xda xcl

Now if you do a i2cdetect, the reserved devices (UU) should be gone. They never should have been there in the first place but that is another topic.

I really should try the latest raspbian on a model B. I am having such good reliability with the year+ old image that I hate to change.
by Richard-TX
Sat Jan 10, 2015 4:52 pm
Forum: Networking and servers
Topic: Send email to raspberry pi to do tasks
Replies: 26
Views: 20717

Re: Send email to raspberry pi to do tasks

I will do what I can. The key to all of it is the .forward file in the recepients home dir. Pipeing the email into a script from within the .forward file is what is needed. There are a few examples. Let me know if you get stuck. Here is a quick and easy guide. http://www.activecampaign.com/help/forw...
by Richard-TX
Sat Jan 10, 2015 4:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi = DCC for model railways?
Replies: 34
Views: 24504

Re: Pi = DCC for model railways?

I have added some code to srcpd that permits the Raspberry pi to operate as an accessory decoder. It is similar in operation to Rocnetnode, but uses SRCP as the protocol. What I have so far is: 16 channel servo/led controllers relay controllers (turnout frog power switching) zero loss occupancy dete...
by Richard-TX
Sat Jan 10, 2015 4:21 pm
Forum: Automation, sensing and robotics
Topic: Pushing temperature to a url
Replies: 6
Views: 1316

Re: Pushing temperature to a url

The way I would approach this problem is like this: Write a program that will read the temp from the sensor and write it to a file appending the latest reading to the file. something like: while true do sleep 120 TEMP=`[read the temp sensor]` DATE=`date` echo "$DATE $TEMP" >> /var/log/mytemp-data do...
by Richard-TX
Sat Jan 10, 2015 4:06 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c to other i2c's xda xcl
Replies: 9
Views: 2103

Re: i2c to other i2c's xda xcl

If you are using a B then I am not sure what to tell you.

/dev/i2c-0 should be there assuming you took the entries out of the blacklist and added the correct lines to the modules file.

adding the packages i2c-tools and python-smbus helps.

What is the OS image name that you downloaded?
by Richard-TX
Sat Jan 10, 2015 3:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c to other i2c's xda xcl
Replies: 9
Views: 2103

Re: i2c to other i2c's xda xcl

If you do not have /dev/i2c-0 appear then you are missing some more fundamental things If you have a B+ then you need the following. your /boot/cmdline.txt must look like this: dwc_otg.lpm_enable=0 bcm2708.vc_i2c_override=1 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elev...
by Richard-TX
Sat Jan 10, 2015 3:37 pm
Forum: General programming discussion
Topic: GPIO through CGI
Replies: 20
Views: 11343

Re: GPIO through CGI

WHen it comes to the RPI. cgi, gpio, and root access there are a few options. 1 - make your cgi program suid root. (chown root - chmod 4755) 2 - reduce the permissions on the GPIO interface 3 - let the httpd process run as root. The best option is likely #2 or #1 assuming that the suid cgi program i...
by Richard-TX
Sat Jan 10, 2015 3:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c to other i2c's xda xcl
Replies: 9
Views: 2103

Re: i2c to other i2c's xda xcl

I am concerned that you never got the 2nd bus operational. there are a few things to remember. 1 - Despite the fact that the P5 header is very close to the existing header, DuPont connectors fit just fine. 2 - You have to enable the 2nd i2c bus by running a script at boot. 3 - The P5 pinout pictures...
by Richard-TX
Fri Jan 09, 2015 2:53 pm
Forum: Beginners
Topic: GPIO Buttons in Adventures in Raspberry Pi not working
Replies: 2
Views: 513

Re: GPIO Buttons in Adventures in Raspberry Pi not working

rotate the push buttons 90 degrees
by Richard-TX
Fri Jan 09, 2015 9:47 am
Forum: General discussion
Topic: Still have SD card corruption issue?
Replies: 18
Views: 3603

Re: Still have SD card corruption issue?

I now have 6 Pis that I routinely remove the power from while it is running. All of them are equipped with Toshiba Exceria cards. Two of the Pis have been in place for over a year and one gets it's power pulled without a shutdown at least once a day. I had a couple of cheap cards that failed before ...
by Richard-TX
Fri Jan 09, 2015 5:56 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Fixed I2C address - best solution for third sensor
Replies: 41
Views: 6057

Re: Fixed I2C address - best solution for third sensor

I have been out of commission with a bad head cold. I am just now getting back to where I was. 1 - My drawing is wrong. It is what happens when a cold starts. Anyway, there are 4 interrupt inputs. These should be tied high thru a pullup if unused. 2 - The interrupt output is an open drain and as suc...
by Richard-TX
Fri Jan 09, 2015 5:36 am
Forum: Automation, sensing and robotics
Topic: sorting data
Replies: 16
Views: 1971

Re: sorting data

When I do daily log files I use a format like yyyy-mm-dd that way a ls always sorts things correctly. In you case I would use yyyy-mm-dd-hh-mm-ss where hours are in 24 hour format. If you wish to use a different separator, feel free. Note that the month, hours, etc are always 2 digits long even if t...
by Richard-TX
Tue Jan 06, 2015 6:25 am
Forum: Raspbian
Topic: How do I catch a shutdown in a Python script
Replies: 2
Views: 1856

Re: How do I catch a shutdown in a Python script

Write a init script that will send a signal to your process. Trap that signal and then your program can exit cleanly, flush buffers, etc. In addition your script can shut down the database, etc.
by Richard-TX
Tue Jan 06, 2015 6:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: multiple I2C devices
Replies: 15
Views: 4250

Re: multiple I2C devices

I typically use 4 MCP23017 chips on a Rpi for a total of 64 GPIOs. I have wired 16 of them to a single PI as the Rpi has two I2C buses. 16*16=256 GPIOs. To really reduce latency, raising the I2C bus speed helps. The MCP23017 is capable of 1.7 Mhz I2C bus speed. I have run the I2c Bus speed up to 1.2...
by Richard-TX
Tue Jan 06, 2015 6:07 am
Forum: Automation, sensing and robotics
Topic: Controlling a coffee maker with Raspberry Pi
Replies: 17
Views: 6587

Re: Controlling a coffee maker with Raspberry Pi

joejoinerr wrote: I have no electronics knowledge whatsoever.
Now THAT is a problem.
by Richard-TX
Mon Jan 05, 2015 3:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: multiple I2C devices
Replies: 15
Views: 4250

Re: multiple I2C devices

I think that a few google searches might help.

"Unix time sharing system"
"Unix Context switch"
"Unix Internals"
by Richard-TX
Mon Jan 05, 2015 3:27 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Fixed I2C address - best solution for third sensor
Replies: 41
Views: 6057

Re: Fixed I2C address - best solution for third sensor

I have used these PCA9544A boards to expand an I2C bus. Very easy to use. http://www.dsscircuits.com/sale/product/dssc0107 $6.50 ea http://www.dsscircuits.com/media/com_hikashop/upload/thumbnails/200x200f/20130726_094435.jpg i would like to try this one out but the company is out of stock with no c...
by Richard-TX
Fri Jan 02, 2015 9:50 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: multiple I2C devices
Replies: 15
Views: 4250

Re: multiple I2C devices

There are some I2c devices that have tri-state address pins. That means that with two address pins, 9 addresses are available

L=low H=high O=open
OO
OL
OH
LO
LL
LH
HO
HL
HH

I remember seeing quad state address pins somewhere. Low, High, Open, and Connected to SCL.
by Richard-TX
Thu Jan 01, 2015 3:55 am
Forum: Python
Topic: Execute script within script and control it
Replies: 12
Views: 1826

Re: Execute script within script and control it

I would like to start a python script from within a master python script BUT: - it should not stop the master script but just execute alongside AND - I need to be able to terminate the execution of that script at any time. I am using the subprocess.check_output command for an os status request but ...
by Richard-TX
Mon Dec 29, 2014 5:03 am
Forum: General discussion
Topic: Can a PI play mp3s for a week from a battery
Replies: 13
Views: 1752

Re: Can a PI play mp3s for a week from a battery

You really never specified what kind of battery.

A Rolls Surrette 8CS25PS (8-CS-25PS / 8CS-25PS) is rated at 1156 amp Hrs. So if a Pi is drawing 1/2 amp, that battery will run the Rpi for a little over 96 days.
by Richard-TX
Mon Dec 29, 2014 3:27 am
Forum: Beginners
Topic: security and new accounts
Replies: 1
Views: 362

Re: security and new accounts

If you want it secure, then don't use sudo. Assign a root password and use su.

Sudo is a security risk. I work at a large financial institution and few things will get you fired faster than installing sudo, sus, etc.
by Richard-TX
Mon Dec 29, 2014 3:22 am
Forum: General programming discussion
Topic: Controlling a Pi over the internet (without port forwarding)
Replies: 20
Views: 15124

Re: Controlling a Pi over the internet (without port forward

azaram wrote:I found a great post here:
http://www.leggetter.co.uk/real-time-we ... gies-guide

I
Time sensitive/low latency software and Java are mutually exclusive.
by Richard-TX
Mon Dec 29, 2014 3:17 am
Forum: Automation, sensing and robotics
Topic: reverse SSH alternatives
Replies: 2
Views: 921

Re: reverse SSH alternatives

There are always alternatives. Without any list of requirements, the field is wide open. Here are just a few ways to access a RPI remotely.

port tunnelling
email gateway
web pages (webmin, DIY scripts, etc)
telnet
ftp

and more.

Go to advanced search