Helllo community,
I want to use the ADC on the Gerdboard. I started with the example code, witch was mentioned in the book "Raspberry Pi - Das umfassende Handbuch"
The code looks like this:
import spidev
import time
spi = spidev.SpiDev()
spi.open(0,1)
while True:
antwort = spi.xfer([1,128,0])
if 0 <= antwort[1] <=3:
wert = ((antwort[1] * 256) + antwort[2]) * 0.00322
print wert, " V"
time.sleep(1)
Pretty easy, but I got the ErrorMessage: typeError Argument must be a list of at least one, but not more than 4096 integers
I found an answer here: https://www.raspberrypi.org/forums/viewtopic.php?p=309582
My problem is now about to change the file. I have no writing-rights.
This problem could not be solved by the chmod "bufsiz" command.
I was allowed to change the file as I loged in with the sudo su superuser, but the change was removed after a reboot and a login with the normal user "pi-raspberry".
Do you think changing bufsiz is the right way and can you help me changing it permanently?
Thank you
Sebastian