Search found 235 matches
- Wed Apr 10, 2013 3:06 am
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI ADC was working fine last week and now it's not
- Replies: 27
- Views: 7619
Re: SPI ADC was working fine last week and now it's not
The rmmod/modprobe commands basically remove the SPI driver from memory and then restart it. If the driver is corrupted or an incompatible version you should receive a message indicating a problem when the modprobe command is executed. Barring an issue with your wiring or ADC, it is possible you hav...
- Tue Apr 09, 2013 6:21 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI ADC was working fine last week and now it's not
- Replies: 27
- Views: 7619
Re: SPI ADC was working fine last week and now it's not
It almost seems that the SPI is not enabled for the GPIO lines. I recall an earlier thread that discussed an issue with using the SPI for GPIO and then attempting to use it for SPI required a reboot. Can you confirm that no other application has used the same GPIO pins for IO before you run your pro...
- Mon Apr 08, 2013 11:42 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI ADC was working fine last week and now it's not
- Replies: 27
- Views: 7619
Re: SPI ADC was working fine last week and now it's not
I reviewed the code and connections again and I see nothing incorrect in the implementation. I can only suggest a few rudimentary tests to confirm everything is as you expect. 1. Confirm that you are using xfer and not xfer2. 2. Using a multimeter, confirm the ADC input from the potentiometer varies...
- Mon Apr 08, 2013 6:45 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI ADC was working fine last week and now it's not
- Replies: 27
- Views: 7619
Re: SPI ADC was working fine last week and now it's not
Sorry for the delay, but I have been rather busy. Nothing obvious in the wiring. I will take a closer look at this tonight on my Raspberry Pi and post back.
Enjoy!
Bill
Enjoy!
Bill
- Thu Apr 04, 2013 1:20 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI ADC was working fine last week and now it's not
- Replies: 27
- Views: 7619
Re: SPI ADC was working fine last week and now it's not
Please post a drawing of how you have MCP3004 connected and your code. Unless there is a hardware failure, the issue is either wiring or software. With the additional information, it will be possible to help you determine the cause.
Enjoy!
Bill
Enjoy!
Bill
- Thu Apr 04, 2013 1:17 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: MCP3008 SPI Inaccurate readings..
- Replies: 13
- Views: 17805
Re: MCP3008 SPI Inaccurate readings..
Question: how are you measuring the throughput and is this without any other IO? Sometimes the limiting factor for peripheral IO is how the data is being recorded and not so much how it is being acquired. As a first test, I would do a simple read loop of the MCP3008 with no data storage and no user ...
- Thu Apr 04, 2013 1:10 pm
- Forum: Python
- Topic: spidev xfer2 v xfer
- Replies: 5
- Views: 21167
Re: spidev xfer2 v xfer
I will look at this again, but I do remember my initial testing showed the CSx was not released between transactions when using xfer2 unless another SPI device was accessed, the SPI connection was closed, or an xfer transaction was initiated. I will not be able to look at this in depth until this we...
- Sun Mar 31, 2013 4:09 pm
- Forum: Other projects
- Topic: Glowing Red Alert Button, The Octoalert
- Replies: 5
- Views: 3502
Re: Glowing Red Alert Button, The Octoalert
Great Dad! In no time he will be programming his own missions!
Enjoy!
Bill
Enjoy!
Bill
- Sun Mar 31, 2013 3:59 pm
- Forum: Troubleshooting
- Topic: I2C strange interference by mains
- Replies: 18
- Views: 4723
Re: I2C strange interference by mains
I do not know how the I2C display is wired, but I have seen similar issues when separate power supplies are used for the controller and display when the grounds are not connected common. If the display is not connected to the Raspberry Pi power supply, the display power supply ground must be connect...
- Mon Mar 04, 2013 4:35 pm
- Forum: Python
- Topic: Nokia Pi LCD
- Replies: 253
- Views: 122234
Re: Nokia Pi LCD
Morning all. Re the comment above, I always have to remove white space when i'm posting from this board - normally end up with two spaces at least to take away. Easy enough to remove in Idle, but i'm not sure why it happens :o Steve, Are you using the "CODE: SELECT ALL" at the top of the ...
- Sun Mar 03, 2013 12:51 am
- Forum: Python
- Topic: Nokia Pi LCD
- Replies: 253
- Views: 122234
Re: Nokia Pi LCD
I'm not certain, but I would consider that there is an extra non-printing character on the line with "SCE" that is causing the syntax error. Looking at your error message, it shows a pointer immediately after "SCE" before the "=". Try deleting and retyping the line: SCE...
- Tue Feb 26, 2013 9:38 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: SPI slave devices
- Replies: 6
- Views: 4882
Re: SPI slave devices
The Raspberry Pi does not have hardware support to be used as a SPI slave device.
I have been experimenting with SPI LCD displays, ADCs, DACs, and port expanders. I have also done some work with high speed communication with Stellaris processors over SPI.
Enjoy!
Bill
I have been experimenting with SPI LCD displays, ADCs, DACs, and port expanders. I have also done some work with high speed communication with Stellaris processors over SPI.
Enjoy!
Bill
- Mon Feb 25, 2013 1:05 am
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: MCP3004 not working/noise on line
- Replies: 11
- Views: 6729
Re: MCP3004 not working/noise on line
A faulty pot is a possibility. Usually though ADC stability problems can be traced to noise on the power. An open connection input will be unstable. If you want a stable test value, just use two equal value resistors in series from Vcc to ground, with the center connected to the ADC input. You shoul...
- Sun Feb 24, 2013 3:30 am
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: MCP3004 not working/noise on line
- Replies: 11
- Views: 6729
Re: MCP3004 not working/noise on line
Giving a quick look at the data sheet and your code, I see two issues. 1. You should use xfer() instead of xfer2(). xfer2() does not release the CSx line between transfers, and it is needed by the MCP3004. 2. For single ended conversion, change: r = spi.xfer2([1, (4+channel)<<4, 0]) to r = spi.xfer(...
- Sat Feb 23, 2013 9:51 am
- Forum: Python
- Topic: only for the greats in socket programming
- Replies: 6
- Views: 2356
Re: only for the greats in socket programming
Please post your source inside using the "Code" button to preserve formatting. This makes it possible for others to review your code with the indenting as you entered. If you are connecting as a client to a telnet daemon on the "HMI" system, it is possible you are seeing the effe...
- Tue Feb 19, 2013 1:32 am
- Forum: Python
- Topic: 20x4 i2c lcd lines out of order.
- Replies: 23
- Views: 27398
Re: 20x4 i2c lcd lines out of order.
The display and code are working correctly. The standard character addressing for a 20 character by 4 line display with an HD44780 controller is: LCD-20x4-memory(b).gif If you sequentially write 80 characters to the display, they will display on line 1, followed by line 3, followed by line 2, follow...
- Mon Feb 18, 2013 9:53 pm
- Forum: Deutsch
- Topic: C/C++ Compiler
- Replies: 3
- Views: 3068
Re: C/C++ Compiler
Code: Select all
pi@raspberrypi ~ $ which gcc
/usr/bin/gcc
pi@raspberrypi ~ $ which g++
/usr/bin/g++
Code: Select all
pi@raspberrypi ~ $ which cc
/usr/bin/cc
pi@raspberrypi ~ $ which c++
/usr/bin/c++
Bill
- Sun Feb 17, 2013 5:39 pm
- Forum: C/C++
- Topic: 74HC164N Daisy Chain Problem
- Replies: 5
- Views: 2022
Re: 74HC164N Daisy Chain Problem
Connect the CLK and /CLR pins of each chip together with CLK going to your GPIO driving the clock and /RST going to your GPIO for resetting the shift registers. Connect QH output(last) of the first shift register to DSA and DSB of the second shift register. Connect DSA and DSB of the first shift reg...
- Sun Feb 17, 2013 12:24 am
- Forum: Python
- Topic: "GPIO.output(farray, True)" doesn't work
- Replies: 2
- Views: 1258
Re: "GPIO.output(farray, True)" doesn't work
As the error message states, function GPIO.output() requires an integer first argument, not an array.
If you want to set an output for all pins in an array, try:
Enjoy!
Bill
If you want to set an output for all pins in an array, try:
Code: Select all
for pin in array:
GPIO.output(pin, True)
Bill
- Sat Feb 16, 2013 2:25 pm
- Forum: C/C++
- Topic: Qt with Wiring PI
- Replies: 26
- Views: 37072
Re: Qt with Wiring PI
Are you cross compiling with Qt? With multiple copies/versions of WiringPi libraries on the system, I would recommend starting from a fresh OS and Qt install with the corrected build files.
Enjoy!
Bill
Enjoy!
Bill
- Sat Feb 16, 2013 2:23 am
- Forum: C/C++
- Topic: Qt with Wiring PI
- Replies: 26
- Views: 37072
Re: Qt with Wiring PI
You are confusing the library and include sections in the .pro file.
In your .pro:
Enjoy!
Bill
In your .pro:
Code: Select all
# So wiringPi include files can be found during compile
INCLUDEPATH += /usr/local/include
# To link the wiringPi library when making the executable
LIBS += -L/usr/local/lib -lwiringPi
Bill
- Sat Feb 16, 2013 2:13 am
- Forum: Deutsch
- Topic: C/C++ Compiler
- Replies: 3
- Views: 3068
Re: C/C++ Compiler
Hallo,
Ja, die GCC C/C++ Compiler sind bereits vorinstalliert.
Viel Spaß!
Bill
Ja, die GCC C/C++ Compiler sind bereits vorinstalliert.
Viel Spaß!
Bill
- Sat Feb 16, 2013 2:08 am
- Forum: Beginners
- Topic: GPIO programming question
- Replies: 2
- Views: 972
Re: GPIO programming question
You need to call the GPIO initialization and if you are going to use a GPIO pin as an output, you must first set the output mode for the GPIO. #!/usr/bin/env python import RPi.GPIO as GPIO import time # to use Raspberry Pi board pin numbers GPIO.setmode(GPIO.BOARD) # Set pin 11 as an output GPIO.set...
- Sat Feb 16, 2013 12:13 am
- Forum: C/C++
- Topic: getopt() alert
- Replies: 6
- Views: 2887
Re: getopt() alert
For your example, do you have "c" declared as "int"? I've only seen the problem you describe when "c" is declared "unsigned char". Can we see more of your test code?
Enjoy!
Bill
Enjoy!
Bill
- Fri Feb 15, 2013 8:44 pm
- Forum: Python
- Topic: buttons and pcf8574 in python
- Replies: 6
- Views: 11443
Re: buttons and pcf8574 in python
The print format I use shows the value in hexadecimal. You need to test against hexadecimal if you want to try a specific value. Try this: if pins == 0xef: print "Hallo" The "0x" says the following is in hexadecimal. :) Even better, and allowing for multiple key presses: if (pins...