How to send data from Arduino to Cortex via UART using RobotC?

#1

I’m trying to figure out how to send data from an Arduino to the current (non V5) Cortex via UART using RobotC. When I google for this, I find methods that apply to the ancient (PIC based) Cortex, and Cortex-to-Cortex, etc. But I haven’t found any recent postings that show exactly how to do this. Anyone happen to have some code they would like to share? Thanks.

0 Likes

#2

Check out this post I found from 2014…

https://vexforum.com/t/codys-beaglebone-black-cortex-bridge/27395/1

0 Likes

#3

Thanks for the link. However, about the only useful tidbit I could understand from that thread was the (probable) need for a level shifter between the Arduino and Cortex. There seems to be so much else being discussed about the BeagleBone and everything else, I just plain got lost. I was hoping for something a little easier to understand since my knowledge of bit banging is sorely limited. I might be needing something maybe more plug-and-play, and maybe not so lets-reinvent-the-wheel-ish.

0 Likes

#4

It should be the same as cortex to cortex. What arduino were you gonna use? I can take a look at the data sheet.

0 Likes

#5

There was this
https://vexforum.com/t/cortex-brain-communicating-with-devices/23714/1
that had some links to earlier work. I know @fretless_kb did a bunch of work in this area.

and I found this, but don’t seem to have the cortex side.
serialArduino.zip (1.96 KB)

0 Likes

Can I have an Arduino communicate directly with a cortex?
#6

Right now I’ve been tinkering with the Arduino Uno. I’m having the Arduino take data (color signature, X, Y position) from a Pixy Cam and I’d like to pass it on for use with the Cortex. I can see the data on the Arduino IDE serial monitor. I just wish I knew how to read that data with the Cortex using RobotC. I’m presuming the UART would be the best way to try that.

0 Likes

#7

probably adapt this for cortex side

0 Likes

#8

I know RobotC does have some UART functions that are available for use.

http://www.robotc.net/wikiarchive/VEX2_Functions_Serial_Link

0 Likes

#9

jpearman! Hey, since I have your attention. I noticed that the Super User setting on RobotC has some kind of configuration for the CMUCAM. Any chance that can be used directly with the CMUCAM 5 (=Pixy Cam) in existence now?

0 Likes

#10

Justin wrote some handy RobotC code to work with the Pixy. You can find it in the BNS code release from Starstruck. https://github.com/JMarple/BNS_2017/blob/master/Striker2/pixy.c

0 Likes

#11

This is mind-blowingly impressive! I’ll need to study it, though. At first glance, it’s way over my head. Like, waaaay over.

0 Likes