Jump to content
Sign in to follow this  
areben

Community Project: ROCKETuC

Recommended Posts

ROCKETuC is a library for launchpad, processing and Java which allows for control of the microcontroller through USB.

 

Stefan Wendler and I (mostly Stefan :) ) have been putting this together to get it to a state to release for feedback.

 

"ROCKETuC is a Library for fast prototyping of micro-controllers through serial protocols.

Currently the TI Launchpad with an MSP430G2553 installed is the only supported

hardware."

 

Right now, we have a github page with a pre-alpha release

 

https://github.com/areben/ROCKETuC

 

 

A how-to for processing

 

Processing example code

 

Here is an image of a simple GUI in processing by Stefan:

wis4z.png

 

Source code for the GUI

 

We are looking for people to try it out and give some feedback.

We are also looking for coders to help with the project, specifically with the processing library, add-on modules, documentation and website.

 

We will also have a homepage up at

homepage: http://rocketuc.com

Share this post


Link to post
Share on other sites

Looks nice.

 

Do you have any documentation on the serial protocol used between the PC and the LaunchPad? Other similar projects have used various protocols.

 

Firmata was developed for the Arduino but they have encouraged other similar projects to use their protocol.

 

And a developer on this site has a simple protocol he uses for MSP PC GUI Eval Tool

 

I would like to see some standardization in these types of communications.

Share this post


Link to post
Share on other sites

Here is the protocol definition for ROCKETuC.

 

And yes, the Simpsons already did it, ah no I mean Firmata does something similar, but we use a different protocol ... A standard in general would be a good thing but is hard to achieve. But the protocol (as well as the transport layer) of ROCKETuC are only one aspect of ROCKETuC, and they are exchangeable in fact.

 

Regards,

Stefan

ROCKETuC_Protocol.pdf

Share this post


Link to post
Share on other sites

Thanks,

 

I see one of the packet types is "External Interrupt function (setup)" Is the plan to have a configurable MSP event that's able to trigger a message on the USB port such as when a specific input goes high or low so the PC does not need to continually poll the input?

 

Any chance at some servo control commands?

 

I don't know Processing but I would like to use the protocol and firmware from a project like this to turn the LaunchPad into a general purpose Input/Output board for another project I work on that does home automation. Open Source Automation

Share this post


Link to post
Share on other sites
Thanks,

 

I see one of the packet types is "External Interrupt function (setup)" Is the plan to have a configurable MSP event that's able to trigger a message on the USB port such as when a specific input goes high or low so the PC does not need to continually poll the input?

 

Any chance at some servo control commands?

 

I don't know Processing but I would like to use the protocol and firmware from a project like this to turn the LaunchPad into a general purpose Input/Output board for another project I work on that does home automation. Open Source Automation

 

There is exactly such a thing for external interrupts as you described it :-) The MSP is configured to call an interrupt handler if e.g. a LOW-HIGH edge or HIGH-LOW edge is detected, and then passes that along the USB as ROCKETuC Protocol message. And this actually causes the client API to call your call-back handler ...

 

Regarding the servo stuff. I am not sure if we really need to abstract that any more (but it would be easily possible to "mix-in" additional Functionality to the core ROCKETuC). Driving a servo is as easy as this:

 

// import ROCKETuC API

import rocketuc.processing.*;

 

// our instance of the ROCKETuC API referenced through variable r

ROCKETuC r;

 

int dcConvert(int dcPercent) {

return (0xFF / 100 * dcPercent);

}

 

void setup() {

try {

// connect to MCU, replace "/dev/ttyACM0" with you virtual COM port

r = new ROCKETuC(this, "/dev/ttyACM0");

 

// set P2.1 as PW

r.pinMode(ROCKETuC.PIN_2_1, ROCKETuC.PWM);

 

// set PWM period to 22000us on pin 2.1

r.pwmPeriod(ROCKETuC.PIN_2_1, 22000);

 

// set PWM duty cycle on pin 2.1 (center)

r.pwmDuty(ROCKETuC.PIN_2_1, dcConvert(9));

delay(1000);

 

// set PWM duty cycle on pin 2.1 (full right)

r.pwmDuty(ROCKETuC.PIN_2_1, dcConvert(14));

delay(1000);

 

// set PWM duty cycle on pin 2.1 (full left)

r.pwmDuty(ROCKETuC.PIN_2_1, dcConvert(4));

delay(1000);

}

catch(Exception e) {

// If something goes wrong while communication with the MCU

// the catch block will be processed. Here the error handling

// should be done.

println(e.getMessage());

exit();

}

}

Share this post


Link to post
Share on other sites
Thanks,

 

I see one of the packet types is "External Interrupt function (setup)" Is the plan to have a configurable MSP event that's able to trigger a message on the USB port such as when a specific input goes high or low so the PC does not need to continually poll the input?

 

Any chance at some servo control commands?

 

I don't know Processing but I would like to use the protocol and firmware from a project like this to turn the LaunchPad into a general purpose Input/Output board for another project I work on that does home automation. Open Source Automation

 

interesting: what language are you intending to use? what is the device you are intending to connect the launchpad to?

Share this post


Link to post
Share on other sites
Thanks,

 

I see one of the packet types is "External Interrupt function (setup)" Is the plan to have a configurable MSP event that's able to trigger a message on the USB port such as when a specific input goes high or low so the PC does not need to continually poll the input?

 

Any chance at some servo control commands?

 

I don't know Processing but I would like to use the protocol and firmware from a project like this to turn the LaunchPad into a general purpose Input/Output board for another project I work on that does home automation. Open Source Automation

 

ah and I forgot an other thing: you don't need to use Processing at all! The processing library just relays on a Java library which exactly provides the same functionality. Anyway, if you intend to connect the Launchpad to a small embedded like hardware (RasPi or whatever), Java may not be the best choice. I am thinking about providing a Python binding as well :-)

 

I wrote up lately some Client Implementation Hints to make it more easy for others to come up with bindings in other languages (personally I would love to see a C++ API).

Share this post


Link to post
Share on other sites

As a random passer-by, I see following issues with the project:

 

1) You say that there would be a website, however there's just an empty wordpress template hanging there from April 2012, which gives not-so-good impression (*1).

 

2) As was pointed, there're existing projects/implementations for such protocols/usage, one may wonder why this project is "better" (or more formally, what requirements it had not satisfied by existing projects/protocols).

 

*1 Friendly suggestion is to just link to github wiki page from the site.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...