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?
Tagged
Categories
- All Categories
- 105 Announcements & News
- 55 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 55 Unboxing & Project Sharing
- 32 Tech Updates
- 660 UP Products
- 1 UP 7000
- UP Squared i12
- 8 UP Xtreme i12
- 9 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 18 UP Squared V2
- 54 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 58 UP Squared Pro
- 142 UP Xtreme
- 834 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 215 Starter Kits & Peripheral