Programming UP Board
I am in a Senior Design project and we are trying to use 2 UP boards and a TI MSP432 Microcontroller to build a robot. We will be using Code Compose Studio to program the MSP432 and would like to also use this IDE to program the UP boards also to keep it simple, but everything I am researching about is using Python scripts and repositories etc. I would like to know if this is even possible or what other methods are available. Any information would be helpful, thank you!
Answers
-
@Kain said:
I am in a Senior Design project and we are trying to use 2 UP boards and a TI MSP432 Microcontroller to build a robot. We will be using Code Compose Studio to program the MSP432 and would like to also use this IDE to program the UP boards also to keep it simple, but everything I am researching about is using Python scripts and repositories etc. I would like to know if this is even possible or what other methods are available. Any information would be helpful, thank you!Hello and welcome!
Can you go into more details about what you want to "program the UP boards" for?
The UP devices are basically full fledge computers. The same you are reading this message on (if on a desktop). They run full 64-bit Windows 10 and various Linux operating systems.
So, anything you would want to "program" on Windows or Linux, you do the same on the UP Boards. Python, C, GoLang, .NET Core, C#, Haskell, etc. You are not limited to any languages, only what your OS supports.
As a matter of fact, you could go ahead and connect a monitor, KB and Mouse to your UP Boards, install Ubuntu OS or Windows 10 on them and then install your Code Compose Studio on - and do everything from the UP Board.
Let us know! Would love to hear more about the UP boards and robots.
Eric Duncan - UP Evangelist - My thoughts are of my own free will
Answered? Please remember to mark the posted answered to highlight it for future visitors!
-
@eduncan911
Oh, wow. I have not been introduced to boards with as much flexibility as the UP board. We ultimately would like to use each of our UP boards with the Intel Realsense device to do image processing for navigation, while also using sonar sensors for extra navigation assistance to control 2 motors accordingly and display digital signage (An autonomous mobile advertiser robot). Then once the UP boards have collected all this data we would like them to send the data to our MSP432 to collect it all in 1 place for real time data and interpret sensor readings for navigating. We are more familiar with an IDE type environment like Code Composer Studio as opposed to using scripts and pushing them through repositories. We are also aiming to build the robot to work without internet or bluetooth, but instead radio frequencies for user controlling if needed. This is more of an embedded programming project. I appreciate the quick response, I am excited to hear more from you! Thank you! -
@Kain said:
@eduncan911
Oh, wow. I have not been introduced to boards with as much flexibility as the UP board. We ultimately would like to use each of our UP boards with the Intel Realsense device to do image processing for navigation, while also using sonar sensors for extra navigation assistance to control 2 motors accordingly and display digital signage (An autonomous mobile advertiser robot). Then once the UP boards have collected all this data we would like them to send the data to our MSP432 to collect it all in 1 place for real time data and interpret sensor readings for navigating. We are more familiar with an IDE type environment like Code Composer Studio as opposed to using scripts and pushing them through repositories. We are also aiming to build the robot to work without internet or bluetooth, but instead radio frequencies for user controlling if needed. This is more of an embedded programming project. I appreciate the quick response, I am excited to hear more from you! Thank you!Not a problem.
Note that the UP Boards also have a 40-pin GPIO that uses the Raspberry Pi format. You can use them for any inputs/outputs you'd like to trigger as well. You can also use standard Raspberry Pi HATs, such as a Motor Hat to handle all of the driver train of the robot wheels. Just note that HAT support is limited to whatever drivers/scripts the makers publish. Most of the Adafruit motor driver HATs for Raspberry Pis work. There's a list in UP's a-bit-out-dated Wiki (people in the forums have gotten more hats to work, and I have a few additional hats I haven't published there yet): https://wiki.up-community.org/Hardware#Hardware_Attached_on_Top_.28HAT.29
It looks like Code Composer Studio at first glance is an IDE for microprocessors. You wouldn't use that for the UP Board because you write create normal applications for the OS. It's Linux, so you'll write C++ or Python or GoLang or whatever to run on the operating system.
My initial thoughts would be:
- Install full 64-bit Ubuntu 16.04 LTS and install the UP Kernel (it enables the 40-pin GPIOs)
- Connect the Intel RealSense USB camera to the USB 3.0 OTG port (make sure to use the USB 3.0 OTG cable UP has, as several people have had issues with aftermarket cables)
- Install whatever other Linux drivers you need for your Sonar sensors
- Maybe even install Code Composer Studio as well onto the UP Board so you can program the MSP432 directly from it.
- I'm guessing the MSP432 has an FTDI USB interface? If so, just connect it to the UP Board's USB port. If it's only serial, you can either use the serial cable for UART ports on the UP Board; or, you could even use the UART pins on the GPIO if need be.
- Possibly get an Adafruit Motor HAT for Raspberry Pis, and connect it to the GPIO to handle your high-voltage stepper and/or motor controls
So that's the hardware... I have very limited experience in this area (I've mostly used GoLang and Python for my robots on Raspberry Pi and UP Boards); however, this is how I see you would glue it all together.
First, unless there is something special about the MSP432 - you could just use the quad core Intel Atom CPU on the UP Board itself for all of your work. RealSense is accessible through Linux and Windows (though, Linux has more features) and all of the HAT controls works best with Linux. Though, you wouldn't be using CCStudio but instead learning and writing other languages, like Python or C++.
However, if the MSP432 has great concurrency or FPGA-like performance, I can see your need to use such a device. In that case, I'd still go with the hardware setup I bullet-pointed above, with the MSP432 connected to the UP Board for development with CCStudio. I would then designate barriers:
- Intel RealSense development on Linux using C++/Python scripts and libraries they already have. Maybe loko into Intel OpenVINO to get a good base of image recognition and training today like with TensorFlow that they already have, and you could just retrain the models or tweak it to your needs.
- Take the Console/stdout output of the above work, and write something to parse the output into something you can transfer to your MSP432 device for processing input data. You have dozens of languages options here. Python, Bash, etc - any way you can read stdout from the code above, and send over serial or whatever way you have the MSP432 connected.
- If you want to leverage any GPIOs on the MSP432 itself (I don't know if it has any), then wire them up normally.
- Program the MSP432 from directly on the UP board using CCStudio to handle all of this two-way
- Lastly, the motor outputs... If you want to to control the motors from the UP Board, use the HAT I mentioned earlier. You'd program it with Python to listen for commands from your MSP432 or your RealSense output, whichever. If you want to control the motors from the MSP432, then continue to code it all from within CCStudio.
Anyway you look at it, you are going to have to separate the coding between what you want to process in Linux console vs what you want to offload to the MSP432.
Now that I typed all of the above out... I think the MSP432 is making the project more complicated than it has to be. You can do all of this directly on the UP Board itself under Ubuntu with C++ or Python pretty easily. However, yeah, you'll be learning C++ or Python (or both) to do it all.
Again, I'm still pretty new to FPGA and Robotics myself. But those are my initial thoughts. Someone could swoop in and say, "Eric, be quiet. All the OP needs to do is XYZ and he's done." Hehe
Eric Duncan - UP Evangelist - My thoughts are of my own free will
Answered? Please remember to mark the posted answered to highlight it for future visitors!
-
I would not suggest using the UP board as the development platform. Pretty much any PC or laptop, especially modern ones, are going to be more powerful, which will give you a much better user experience (everything from simple things like opening files or programs to compiling etc). So I would do everything that does not directly require the GPIO header on a "real" PC (MSP development, Intel Real Sense development, ...) and then just deploy it on the UP board once it is ready for testing.
Other than that I would agree with Erics suggestions. Figure out whats needs to run on the MSP and how it will communicate with the UP (probably some serial interface like UART or SPI).
Also, since you mentioned that you do not have experience with repositories, I assume you don't have any experience with Git. I would suggest you look into that, especially if you are working on a project with multiple people. Getting started is really not hard. There are videos on Youtube that can teach you the basics in half an hour or so and it is REALLY helpful when you work on the same project with multiple parts and multiple files with multiple people.
-
Is there any documentation regarding controlling GPIO from Windows or Windows IoT Core?