MRLcomm ESP8266 conversions (aka Grandeurs of Iron Man)

Iron Man is a modular system, i.e. the arms, legs, body and face plate fly in from Tony Starks ridiculously awesome workshop...... each independent from each other until connected....
How can this be applied to the InMoov robotic sub systems .... and why.....

Off the Bat :-

Imagine an InMoov system, Left Arm / Right Arm / Head /Body each being controlled separately by an ESP8266 Wifi module (or any WiFi module, Rpi,etcetcetc)

The profit from doing this is to eliminate data and sensor wires, so you would only effectively need to supply Power to each of the sub segments above..... neat ...... Mumphf.

It would make the systems more interchangeable and you would not need to worry about connectors.

So what follows below is the process of getting MRLcomm to work with an ESP8266 series 12E...

This could take a while.....


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Gareth's picture

Error Log _000 Native MRL code Ported to ESP8266

Just as a Datum this is the Native MRLcomm code ported and tested :-

Error report download aborted :-


sketch_apr26a.ino: In function 'void setPWMFrequency(int, int)':
sketch_apr26a:430: error: 'TCCR0B' was not declared in this scope
sketch_apr26a:435: error: 'TCCR1B' was not declared in this scope
sketch_apr26a:440: error: 'TCCR2B' was not declared in this scope
Multiple libraries were found for "Servo.h"
 Used: C:\Users\James\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\libraries\Servo
 Not used: C:\Program Files (x86)\Arduino\libraries\Servo
'TCCR0B' was not declared in this scope


No worries with the multiple servo libraries as it found the right one....

Soo.... Timers causing first hurdle trouble.

Gareth's picture

After commenting out

After commenting out the


 case SET_PWMFREQUENCY: // FIXME - different boards have different timers
      {
        setPWMFrequency(ioCmd[1], ioCmd[2]);
        break;


and...


// sets frequency of pwm of analog
// FIXME - us ifdef appropriate uC which
// support these clocks TCCR0B
void setPWMFrequency(int address, int prescalar)
{
  int clearBits = 0x07;
  if (address == 0x25)
  {
    TCCR0B &= ~clearBits;
    TCCR0B |= prescalar;
  }
  else if (address == 0x2E)
  {
    TCCR1B &= ~clearBits;
    TCCR1B |= prescalar;
  }
  else if (address == 0xA1)
  {
    TCCR2B &= ~clearBits;
    TCCR2B |= prescalar;
  }

}
 


The code compiled and I was able to open a com port and connect to the MRL, (well it reported as connected and "good Times" ) ,however I was plagued with some bad magic numbers, unfortunately the oscope was also "Blank" which leads me to believe some more issues remain.

GroG's picture

GOODTIMES !!! that was quick

GOODTIMES !!!

that was quick - little bugs might remain .. 

the next up coming jump would be network connectivity or Socket Server which I mentioned .. might be the 'guts' of the WebServer in the example..

OH !  .. heh forgot to mention, but the Serial service already has a TCP/IP port capabity ...
(or at least it used to) 

This wa used when we did virtual InMoov in blender - TCP/IP serial ports were created to talk to the Blender python ...