Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get other sensors to work #1

Open
Calimerorulez opened this issue Feb 13, 2014 · 0 comments
Open

Can't get other sensors to work #1

Calimerorulez opened this issue Feb 13, 2014 · 0 comments

Comments

@Calimerorulez
Copy link

Hi!

I'm trying to get the code to work on my 256MB RPI, with a v1.2 Airpi board, but I don't seem to get all the output of some sensors (I enabled debug):

root@raspberrypi:~/oswabox/build# ./oswabox
DEBUG: Temperature: 18.9 c = 66.02 f
DEBUG: Humidity: 43.7%
Temperature: 18.9000 C = 66.02 F
DEBUG: Temperature: 19.0 c = 66.20 f
DEBUG: Humidity: 43.7%
Humitity: 43.7000 %
Pressure: 994.8500 hPa = 29.38 inch of mercury
0.00
0.00
Wind Speed: 0.0000 mph
Direction: 0.0000
Rain Fall: 0.0000 ipm
Pin 0:LDR light sensor 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 0: 0.0000 ohms
Pin 1:TGS2600 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 1: 0.0000 ohms
Pin 2:MiSC-2710 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 2: 0.0000 ohms
Pin 3:MiCS=5525 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 3: 0.0000 ohms
Pin 4:Sound 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 4: 0.0000 ohms
Pin 5:Wind Direction 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 5: 0.0000 ohms
Pin 6:Open 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 6: 0.0000 ohms
Pin 7:Test Voltage 000000.00 = 0.0000 volts = 0000000.00 Ohms
Device 7: 0.0000 ohms

root@raspberrypi:~/oswabox/build# ./mcp3008
Pin 0:LDR light sensor 0.00 = 0.0000 volts = 0.00 ohms
Pin 1:TGS2600 0.00 = 0.0000 volts = 0.00 ohms
Pin 2:MiSC-2710 0.00 = 0.0000 volts = 0.00 ohms
Pin 3:MiCS=5525 0.00 = 0.0000 volts = 0.00 ohms
Pin 4:Sound 0.00 = 0.0000 volts = 0.00 ohms
Pin 5:Wind Direction 0.00 = 0.0000 volts = 0.00 ohms
Pin 6:Open 0.00 = 0.0000 volts = 0.00 ohms
Pin 7:Test Voltage 0.00 = 0.0000 volts = 0.00 ohms

root@raspberrypi:~/oswabox# ./gpio-status.sh
+----------+-Rev1-+------+--------+------+-------+
| wiringPi | GPIO | Phys | Name | Mode | Value |
+----------+------+------+--------+------+-------+
| 0 | 17 | 11 | GPIO 0 | IN | Low |
| 1 | 18 | 12 | GPIO 1 | OUT | Low |
| 2 | 21 | 13 | GPIO 2 | IN | Low |
| 3 | 22 | 15 | GPIO 3 | OUT | Low |
| 4 | 23 | 16 | GPIO 4 | OUT | Low |
| 5 | 24 | 18 | GPIO 5 | IN | Low |
| 6 | 25 | 22 | GPIO 6 | OUT | High |
| 7 | 4 | 7 | GPIO 7 | IN | High |
| 8 | 0 | 3 | SDA | ALT0 | High |
| 9 | 1 | 5 | SCL | ALT0 | High |
| 10 | 8 | 24 | CE0 | ALT0 | High |
| 11 | 7 | 26 | CE1 | ALT0 | High |
| 12 | 10 | 19 | MOSI | OUT | Low |
| 13 | 9 | 21 | MISO | ALT0 | Low |
| 14 | 11 | 23 | SCLK | ALT0 | Low |
| 15 | 14 | 8 | TxD | ALT0 | High |
| 16 | 15 | 10 | RxD | ALT0 | High |
+----------+------+------+--------+------+-------+

root@raspberrypi:~/oswabox# ./mcp3008-read.sh
This program uses the gpio program build with wiringPi
to display the values of the mcp3008.
+------+---------+--------+
| Pin | Digital | Analog |
+------+---------+--------+
| 100 | 0 | 0 |
| 101 | 0 | 0 |
| 102 | 0 | 0 |
| 103 | 0 | 0 |
| 104 | 0 | 0 |
| 105 | 0 | 0 |
| 106 | 0 | 0 |
| 107 | 0 | 0 |
+------+---------+--------+

The 'original' Airpi code does work.

Can you tell me what I'm doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant