04-12-2016, 07:24 AM
(04-12-2016, 06:22 AM)peterz Wrote:We will need a GPIO library. Or modifications to the Pi library. As it stands the Pi library errors;(04-11-2016, 06:09 PM)Krowyn Wrote: I was looking around for accessories for the Pine 64 and I was hoping to get some cheap accessories. Does anyone know if Raspberry Pi and Arduino accessories compatible are comparable with Pine 64(+)My PINE hasn't arrived yet (ETA is end of May).
Here are some accessories i'm looking into:
http://www.neosecsolutions.com//products...8&cPath=17
http://www.miniinthebox.com/temperature-...rm=2.3.5.0
http://www.miniinthebox.com/electronics-...rm=2.2.1.0
I have bought DHT22 which is more accurate than DHT11 (and is also more expensive) and also bought that display.
I'm convinced both will work. Just the GPIO numbers on PINE seems to be different than on RPI. See http://joey.hazlett.us/pine64/pine64_pins.html for details.
So some tweaking of scripts will be required, but it should work.
For DHT11 or DHT22 check this https://learn.adafruit.com/dht-humidity-...g/overview .
I bought mine from ebay and 1 DHT22 was about 2.75EUR/pcs. I haven't tried it yet.
For LCD display there are 3 options how to connect it with PINE/RPI.
- connect it directly (more GPIO pins is required). See this https://learn.adafruit.com/downloads/pdf...rry-pi.pdf
- connect it through I2C bus (2 GPIO pins for data + 1pin Vcc and 1pin GND )
- connect it through UART
I bought it on ebay as well and cost about 2EUR/pcs. I bought also I2C modul which cost about 1EUR/pcs.
Code:
root@debianpine64:~# python tmp.py
Traceback (most recent call last):
File "tmp.py", line 1, in <module>
import RPi.GPIO as GPIO
File "/usr/local/lib/python2.7/dist-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
Havent got the time to do more than that at the moment.