mbed libraries for EA baseboard peripherals

31 Dec 2010

I sat down to convert the Embedded Artists example code into class libraries for mbed, but then found that Embedded Artists already did it. You have to be registered at the Embedded Artists WWW page to get support, but once you are go to the support section of their WWW page, to baseboard support, then scroll down to the "sample applications" section, where you should find a link to a bundle for the mbed compiler. A word of warning, I found a bug in their accelerometer code, and have sent them a fix. In the meantime if you plan to use it you'll need to change the following lines in the accelerometer ACC::read function

They are lines 116, 123, and 130 and they are:

  • x = (int)buf[0];
  • y = (int)buf[0];
  • z = (int)buf[0];

But need to be:

  • x = (int)(signed char)buf[0];
  • y = (int)(signed char)buf[0];
  • z = (int)(signed char)buf[0];

due to the fact that the mbed compiler treats char as unsigned.

steve