Storing GPIO data in a file in Pi - Raspberry Pi Forums


hi folks,

i'm relatively new , have messed arduinos recently. i'm trying read 16 data pins (16 highs/lows) signal processor, use of 3 signal pins interfaces signal processor manage reading/clearing timings.

previous arduino effort consisted of (when data ready) using serial.print(digitalread(pin#); displays onto arduino's serialmonitor each pin read. after series of data read , printed, copied/pasted serialmonitor window excel spreadsheet run calculations there.

1) right command "print(...)" display gpio pins? (just snippet of in-progress code) "print"/display pin states on python shell?

code: select all

 print(gpio.input(0), gpio.input(1), gpio.input(2), gpio.input(3), gpio.input(4), gpio.input(5), gpio.input(6), gpio.input(7), gpio.input(8), gpio.input(9), gpio.input(10), gpio.input(11), gpio.input(12), gpio.input(13), gpio.input(14), gpio.input(15))
2) print(gpio.input(pin#)) equivalent command arduino's serial.print(digitalread(pin#))? can print several things within same print() command or have have individual print() commands each pin?

3) "ideal" approach read pins , store data (tens of thousands of rows of 16 binary bits) sort of notepad txt file can transfer via usb drive regular computer excel post-processing. how , commands use? or there better way (via ethernet, etc)?

yay first post! :d

thanks!!
wayne

how know when data valid? 16 (gpio) levels unit, i.e. must read @ same time?


raspberrypi



Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code