psas / reaction-control

Mathematical models for an RCS system
GNU General Public License v3.0
25 stars 10 forks source link

Having trouble getting python module MRAA to play nice with Edison Arduino shield #1

Closed jalouke closed 8 years ago

jalouke commented 9 years ago

the python module MRAA is for controlling i2c and gpio on the edison. I can get it to work fine with the mini breakout board. However when I am using the Arduino shield, and I try to initialize a gpio pin it returns an error:

Traceback (most recent call last): File "blink.py", line 5, in x = mraa.Gpio(54) File "/usr/local/lib/i386-linux-gnu/python2.7/site-packages/mraa.py", line 73_ this = _mraa.new_Gpio(pin, owner, raw) ValueError: Invalid GPIO pin specified

from the research I have been doing, it should be possible to use gpio commands on the arduino shield but I am probably missing a setting.

Also when I set raw = True the code doesnt return an error, but it also doesn't output either.

If this can't be fixed then it is not the end of the world, but we will need a new mosfet board with level shifting

jalouke commented 9 years ago

I found this website that has a bunch of tables for selecting and setting values in the linux terminal, but I have no idea how to use it and if possible I would like help figuring it out.

http://www.emutexlabs.com/project/215-intel-edison-gpio-pin-multiplexing-guide

BartMassey commented 9 years ago

I can read the tables, and follow the examples. What do you want help with?

It is possible that mraa.Gpio() is/isn't already doing the mapping between Edison GPIO pin numbers and Arduino shield pin numbers. Try both the raw and mapped pins here...