![]() Wire.write(0x1E) //reset command, tells sensor to calibrate using internal PROM values Wire.beginTransmission(0x76) //this address is correct put your setup code here, to run once: Here is the code used to test that: #include For now I'm just trying to get them to communicate. However, having to debug the libraries every time I want to upload new code is a hassle, so I'm trying to get rid of the library by just having the teensy directly interface with the sensor rather than through a library. ![]() Once that gets sorted out, everything works fine. The problems have always been from the library running the pressure sensor. The setup (with the same hardware) has mostly worked over the past year, with everything working fine until revisions to the code are uploaded to the teensy (about once a month). The sensor is also definitely wired in i2c mode as the i2c scanner was able to find it. Teensy is made to be fully compatible with arduino, and the example code for the teensy wire library uses the same functions as arduino examples. Pullup resistors should also be OK, as it's sometimes worked with the unreliable libraries. The only wires are the internal etchings on the PCB and the header pins on the teensy. The sensor is a MS5611 pressure sensor ( datasheet) surface mounted on a PCB. Here's a slightly better description of what I have:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |