Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 17891

Re: Using Serialx on Edison

$
0
0

I have not tried it yet, but with the Intel release of 1.0.4 they added the Serial2 object which maps to the ttyMFD2 object.  I believe it removes the kernel debugger from this port while the Serial2 object is used.

 

As for doing stuff like Serial1.print(...), or Serial1.read()... I don't know if there are any official libraries to do this, but I have my own that are part of my Raspberry_Pi project (KurtE/Raspberry_Pi · GitHub)

This is a bad name for the project as I started off on a RPI, but have adapted it to Beaglebone Black and Odroid U2/U3 and now to Edison.  Note: I should have made a new branch for the Edison, and may still and see what it takes to move the Edison specific commits to that branch...

 

Also this project is a collection of all of the different things that I have played with on linux.  Things like porting the Hexapod/Quad Phoenix code base to linux.  There is also a couple different versions of it where I  have done work to convert to floating point... Also code for Trossen Phantom Arm, A Rover, ...

 

But there are a few Interesting sub-folders,

    library: the main code base for porting my Arduino code, includes ports, of Stream, Serial, ... Also has a simple Serial wrapper class, which I use for example to create a wrapper around stdout, stdin.

    BoiloidEx and BioloidEx_Usb2Ax: support for Bioloid AX-12 and other other servos using Xevelabs USB2AX adapter - one uses my own firmware extensions

    Adafruit_ILI9341C - My port of the Adafruit ILI9341 driver (example their 2.8" tft display) including some speed ups.  This is Edison specific using MRAA

   (several different test programs) like testAdafruit-ilI9341C - port of graphictest, a read pixel test...  Specific to Edison shows using WrapperSerial to get output to debug window...

 

Side note in library folder, is my support for using the Arbotix Commander, which is a remote control sold by Trossen Robotics which uses XBees.  The files (commanderEx.h and CommanderEx.cpp) is my code base to talk to the XBee.   This code is structured a lot like the default Serial1 code base under Arduino.  It creates a thread that waits for input and it configures the underlying terminal control to work again similar to what the Arduino code base does for Serialx objects.  The main difference is that this code base simply reads the data from the XBee, which have very specific format, and as it gets a valid packet it keeps it.  It only keeps the last valid packet.  The create the more generic SerialX object, the code would instead create a set of pipes (pipe2), that when the secondary thread received a byte it would place it into one pipe, and the the Print code on the other side would write date into the other pipe, which the 2nd thread would need to add to it's wakeup code and then output to underlying terminal hardware.  Note:  some of my recent updates to this included a call out to MRAA to initialize the IO pins associated with the logical Serial1 object.  I still need to add code to somehow check to see if I am using the logical Serial1 object or not as to only call MRAA when necessary.  (My code uses a logical device /dev/ttyXBEE, which could be to that device or could be to a USB to serial device),  This code also requires the most recent version of MRAA to work.  Not sure if you need to build yourself or if the updates have propagated.


Viewing all articles
Browse latest Browse all 17891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>