[ell-i-pcb-design] Re: Nucleo LED shield assembled, mostly ok

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-pcb-design@xxxxxxxxxxxxx
  • Date: Thu, 3 Jul 2014 17:47:23 +0300

> I'll focus on the low level things first. How to program Nucleo (mbed?), how 
> to set up PWM, how to set up ADC etc.

Using mbed to set up the Nucleo first is a good idea, if mbed has rich enough 
APIs.  If not, then it may be best to port our own Runtime and use it, since we 
know it best.

> Once I've done that, I'll do the control loop. If someone has specified the 
> interface by then, I'm happy to implement the specified interface. Otherwise 
> I'll just come up with something among the lines LED(RED, 350); 

There is an CoAP REST API somewhere in the demo code, but a badly done one.  
The C-level API doesn't matter that much.

I think the right way is a REST API with JSON, something like the following.  
(Sorry for syntax errors, I have a bad network connection):

PUT /actuators/leds
{
  red:    80%   
  green:  60%
  blue:   10%
  smooth: 20ms
}

That is, an CoAP PUT with a suitable URL path, JSON content with separate 
fields for RGB or white temperature, and a optional "smooth" or something that 
tells how fast to change the setting.  The smooth can and should be implemented 
later, initially just change the settings at once.

Someone (Teemu?) just needs to write a spec into the Wiki.

--Pekka


Other related posts: