Control GPIOs on Up Squared Board
Hello,
I am struggling to control the GPIOs of the Up Squared. I tried the MRAA libraries without success (I always get 'Invalid GPIO pin specified' as output). Is MRAA the way to go or is there some other way ? Is any additionnal configuration needed in order to use MRAA ?
I am running ublinux 3.0, and the output of uname -a
is
Linux upsquared 4.4.0-ubi4-amd64 #1 SMP Debian 4.4.35-1 (2016-11-29) x86_64 GNU/Linux
Thanks a lot
Comments
-
A bit of update: I am able to toggle a GPIO using bash commands:
cd /sys/class/gpio echo 433 > export echo out > gpio433 while 1 do echo 1 > value; sleep 1 echo 0 > value; sleep 1 done
However, I can't a access the same GPIO using MRAA. My hypothesis is that the pinmap is not loaded properly. Indeed, when I run this simple C hello code, I am not able to recognize the board.
#include "mraa.h" int main(int argc, char** argv) { const char* board_name = mraa_get_platform_name(); fprintf(stdout, "hello mraa\n Version: %s\n Running on %s\n", mraa_get_version(), board_name); mraa_deinit(); return MRAA_SUCCESS; }
-
Hi @mpetitje,
Sorry that I didn't see this thread before. As mentioned on the MRAA issue, that kernel simply does not include UP2 support. Please upgrade to ubilinux 4 or the Ubuntu 4.10 upboard kernel line to use MRAA on UP2.
-
Hi @mpetitje ,
Is that discussion closed? Did you update your kernel using the custom UP kernel?
Cheers!
-
Since I have the same problem, how do I update to Ubuntu 4.10 upboard kernel line? Thx.
-
fixed. Found it at http://wiki.up-community.org/Ubuntu
-
I am unable to run the MRAA library and got an error that attributes "Led" and "Gpio" do not exist. Anyone able to get around these?