Hello guys,
First of all I want to say that we are really new to torizon and linux development, but we are forced to learn fast as we are working on a student project (ETH Zurich Switzerland), where we are building a fully electric motorcycle. So I thank you for you understanding in advance.
We are running the Apalis iMX6Q 2GB IT V1.1C with the Ixora V1.1A carrier board. Our host plattform is ubuntu 18.04LTS. We are planning to use a HDMI display with a USB touch interface.
The Goal:
We would like to build a user interface with the CrankSoftware Storyboard Suite for our motorcycle project to display different sensor data (e.g. ambient temperatur, speed etc). For this we need 2 working protocols I2C and CAN.
The Challenge:
We are quite familiar with MCUs now, but we are having a hard time figuring out how to get a C application running on Torizon, such that it reads the sensor data and sends it to the UI. We got the demo UI up and running and we are able to put a custom made interface on it.
The Questions:
1: How do I get a C application running on Torizon? We already went through the getting started guide and got into the debian docker container, where everything works as usual. Is it possible build a C application there and run it in the background as long as the container is running? Or should we build a docker container where a standalone C application is running, similar to the weston container from CrankSoftware.
2: After having a C application running, how do I initialize the peripherals like I2C/CAN and get them running, such that they can read and send data from sensors? I tried to execute i2cdetect on the debian container, but I always got the error “Error: Could not open file `/dev/i2c-0’: Operation not permitted”. Do we have to write our own drive/library or is there already one? Sorry for this dump question, but I think this is where we stuck the most.
3: After having the above two things, how can I send the data to the UI? If this isn’t your part, I understand that, and I will have a deeper look in StoryboardIO for that and contact CrankSoftware for that.
4: Is it possible to use Storyboard with an HDMI display and a USB touch interface?
Sorry for having this many basic questions but after a lot of researching, we thought posting this in you forum would be the best.
Thank you for your help