Aaron

Members
  • Content Count

    7
  • Joined

  • Last visited

About Aaron

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  • Location
    Pullman, WA
  • Interests
    CompSci, embedded projects, Gerontechnology, Irish hurling, Linux, juggling, sleeping in on weekends

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. BradJ - I'm glad you figured it out. You'll find that some boards already have the pullup resistors in place, so sometimes they're needed and sometimes they're not. It's always worth checking the documents and schematics to make sure they're in place so the I2C bus operates properly. If this one is solved, are you able to mark it or change the title to have [SOLVED] in it? Future googlers will appreciate it.
  2. BradJ, I have used the BNO055 successfully on several Arduino boards, though not with the Feather M0, only the Feather 32u4 boards. The primary thing to watch for is the wiring. Making sure you have both the SCL and SDA wires in the right order, plus VCC and GND. If that all looks good, I would check another I2C board with your Feather M0, then try a different Arduino if you've got one to verify that both the Feather and the BNO boards are working. If that all fails, then you might need to dig around to see if the Feather M0's libraries don't work for some reason, but it's the last place I'd check. Good luck with the project. The BNO055 board is a very nice piece of gear to use for all kinds of IMU kinds of projects.
  3. JColvin, Thank you for checking in on my compiling issues. I have posted this question to the ChipKit forums to see if someone has a fix or they can generate a bug report for however they track these kinds of things. - Aaron
  4. Hello, I have a compile error with the SoftwareSerial library included in ChipKit-core 1.1.0.-18 (the latest released build for manual install at this time). I need the SoftwareSerial.h library for several external devices, but it will not compile the headers on ChipKit boards. I am able to build against the Arduino and Adafruit boards, but all of the Cerebot and ChipKit boards exhibit the same error. Any help would be appreciated. Environment: Arduino IDE 1.6.8 ChipKit-core 1.1.0-18 (latest release build manually installed, also exposed error in 1.1.0.-13)) uC32 (but tested on other Arduino, Adafruit, and ChipKit platforms) The code to reproduce for me is very simple: #include <SoftwareSerial.h> void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: } Just including the SoftwareSerial.h library and selecting any ChipKit device gives these errors: Arduino: 1.6.8 (Windows 8.1), Board: "chipKIT uC32" C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware [Lots of successful file builds] IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\cores\pic32" "-IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\variants\uC32" "-IC:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial" "C:\Users\Aaron\AppData\Local\Temp\buildf71554d8a69c5d822f0c8bd06bd78dc0.tmp\sketch\SoftwareSerialExample.ino.cpp" -o "C:\Users\Aaron\AppData\Local\Temp\buildf71554d8a69c5d822f0c8bd06bd78dc0.tmp\sketch\SoftwareSerialExample.ino.cpp.o" In file included from C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial\examples\SoftwareSerialExample\SoftwareSerialExample.ino:20:0: C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:68:16: error: '_IOPORT_PC' was not declared in this scope { _BV(14), _IOPORT_PC}, // CN0 - RC14 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:69:16: error: '_IOPORT_PC' was not declared in this scope { _BV(13), _IOPORT_PC}, // CN1 - RC13 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:70:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 0), _IOPORT_PB}, // CN2 - RB0 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:71:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 1), _IOPORT_PB}, // CN3 - RB1 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:72:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 2), _IOPORT_PB}, // CN4 - RB2 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:73:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 3), _IOPORT_PB}, // CN5 - RB3 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:74:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 4), _IOPORT_PB}, // CN6 - RB4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:75:16: error: '_IOPORT_PB' was not declared in this scope { _BV( 5), _IOPORT_PB}, // CN7 - RB5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:76:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 6), _IOPORT_PG}, // CN8 - RG6 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:77:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 7), _IOPORT_PG}, // CN9 - RG7 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:78:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 8), _IOPORT_PG}, // CN10 - RG8 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:79:16: error: '_IOPORT_PG' was not declared in this scope { _BV( 9), _IOPORT_PG}, // CN11 - RG9 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:80:16: error: '_IOPORT_PB' was not declared in this scope { _BV(15), _IOPORT_PB}, // CN12 - RB15 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:81:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 4), _IOPORT_PD}, // CN13 - RD4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:82:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 5), _IOPORT_PD}, // CN14 - RD5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:83:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 6), _IOPORT_PD}, // CN15 - RD6 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:84:16: error: '_IOPORT_PD' was not declared in this scope { _BV( 7), _IOPORT_PD}, // CN16 - RD7 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:85:16: error: '_IOPORT_PF' was not declared in this scope { _BV( 4), _IOPORT_PF}, // CN17 - RF4 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:86:16: error: '_IOPORT_PF' was not declared in this scope { _BV( 5), _IOPORT_PF}, // CN18 - RF5 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:87:16: error: '_IOPORT_PD' was not declared in this scope { _BV(13), _IOPORT_PD}, // CN19 - RD13 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:88:16: error: '_IOPORT_PD' was not declared in this scope { _BV(14), _IOPORT_PD}, // CN20 - RD14 ^ C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial/SoftwareSerial.h:89:16: error: '_IOPORT_PD' was not declared in this scope { _BV(15), _IOPORT_PD}, // CN21 - RD15 ^ Using library SoftwareSerial in folder: C:\Users\Aaron\Documents\Arduino\hardware\chipkit-core\pic32\libraries\SoftwareSerial (legacy) exit status 255 Error compiling for board chipKIT uC32. So, what's broken? I've : Tested on two different PCs (windows 7 & windows 8.1) Tried two manually installed release versions of ChipKit-core Compiled on other platforms with complete success (using their libraries) What should be done next?
  5. JColvin, Thank you for the response. I'll see which way seems to make sense. Checking the Arduino IDE library will be quick, and I pretty much presume will have trouble, but it's an easy check. Rewriting some of the API calls is probably the proper route, so I'll let you know how it goes.
  6. Greetings! Follow up with more information about this issue. On another forum, it was pointed out to me that the BNO055 chip uses clock stretching during its I2C communications. This means the slave device can hold the clock line low, which should make the master wait for the data to be ready. Does anyone know if the ChipKit-core 1.1.0-13 release implements clock stretching? Thank you.
  7. Good evening! I am trying to use an Adafruit BNO055 breakout board with a ChipKit uC32 board, but there’s some kind of underlying bug causing the initialization code to fail. I’ve tracked it down to how the reset of the BNO055 is happening, but I’ve hit a wall at how to go deeper. Any advice would be welcome. Hardware used: Adafruit Feather Bluefruit LE Digilent ChipKit uC32 Adafruit BNO055 orientation board breakout Breadboard, wires, etc. Photos of hardware setup attached. To start, I tested using the BNO055 and the Adafruit sensorapi example sketch on an Adafruit Bluefruit LE via the I2C connection. This worked just fine. I've used it for other projects in the past, so that's old hat: https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/overview https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview Then, when I first tested the uC32 with the normal ChipKit-core distribution found via the ChipKit-core url, the I2C implementation was broken. None of the 3 different I2C sensors I had worked. After following the instructions to update ChipKit-core to 1.1.0-13 to fix I2C bug, as suggested below, I as able to connect to devices via I2C: http://chipkit.net/forum/viewtopic.php?t=3585 http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/77/ Note: I did set JP6 and JP8 to enable the I2C interface on the uC32. Tested ChipKit uC32 using the I2C interfaces on the Adafruit BME280 and Si1145 breakout boards. Both worked just fine. Data was read and written properly. Unfortunately, when connecting the BNO055 orientation board from here: https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview The board is recognized (by the device ID of 0xA0), but then the ChipKit uC32 hangs after first println in the sensorapi example sketch. It goes into the bno.begin() call and never returns. Since I can’t do any deeper debugging in the main library, I copied out the BNO055 library (called it C_BNO055) and built against my version. Started with no changes other than the name of the library, include guards, and filenames. Worked just fine on Bluefruit LE, but exhibited the same issues on the uC32. My source code for the library modified for testing is attached to this post. I had combined the three breakout boards into a single program. This worked just fine on the Bleufruit LE, and it accessed all three sensors without issue, but the same bno.begin() call would hang everything. So, I stripped out the other sensors and tested with debugging messages in my custom bno.begin() definition found in C_BNO055.cpp. The code executes until the first BNO055 reset is attempted. Writing 0x20 to the BNO055_SYS_TRIGGER_ADDR resets the sensor. This loop then waits for the device to return 0xA0 for the chip ID, which indicates that it's ready to be used again. Serial.println(" [x] Doing a reset and waiting for the address to stabilize."); write8(BNO055_SYS_TRIGGER_ADDR, 0x20); while (read8(BNO055_CHIP_ID_ADDR) != BNO055_ID) { Serial.print(" [x] Waiting for BNO055 to reset. ADDR of: "); Serial.println(read8(BNO055_CHIP_ID_ADDR), HEX); delay(10); } delay(50); Serial.print(" [x] BNO055 address is now: "); Serial.println(read8(BNO055_CHIP_ID_ADDR), HEX); That loop runs about 8 times (see attached screenshot) for the ChipKit uC32, then just stops. Every read it gets an ID of 0x00 (zero). When the same code is run on the Bluefruit LE, it gets an ID of 0xFF until the board resets (see attached screenshot). Then it gets 0xA0 like it should and continues execution, and my larger program is able to read/write to the BNO055 and other sensors on the same I2C bus. I believe there’s some kind of issue in the ChipKit-core implementation for I2C that’s being exposed by the series of calls leading up to the reset of the BNO055 board. I’m not sure how to proceed at debugging or testing the system. Any advice or investigation would be welcome. I have: Changed the I2C address of the BNO055 by connecting the ADR pin to Vcc and changing the address in the .h file. Worked for Bluefruit, not for uC32. Commented out that address check and added in a delay(300) call. While the code progressed, it crashed when trying to access other I2C devices in loop(). Tried a similar test on a ChipKit MX3ck board with the same results. I’ve tried re-wiring the board/jumpers and testing my solder joints. I'm trying to get this board working on the uC32 as part of the sensor package we're building for the WSU Aerospace Club's rocket. If you'd like me to bring my hardware for testing to Digilent, just let me know via email and I'd gladly cross town to get some help. Thank you for your time. -- Aaron Crandall