Dear Adafruit Team,
I have purchased a BMP183 sensor and I am experiencing problems in making it work properly with an Arduino Due.
I have followed the instructions of the following site for the Arduino Due Hardware SPI ... http://21stdigitalhome.blogspot.gr/2013 ... e-spi.html and I have also checked the Due schematic for the SPI pins.
I have also implemented the following changes in the code of the Adafruit_BMP183.cpp file to adopt it to Due ARM processor
1)
#ifdef __avr__
#include <avr/pgmspace.h>
#include <util/delay.h>
#endif
#ifdef __arm__
#define _delay_ms(ms) delayMicroseconds((ms) * 1000)
#endif
#include <stdlib.h>
2)
#ifdef __avr__
SPI.setClockDivider(SPI_CLOCK_DIV16);
#endif
#ifdef __arm__
SPI.setClockDivider(10, 84);
#endif
The pins I have declared are the following:
// You can also use software SPI and define your own pins!
#define BMP183_CLK 110
#define BMP183_SDO 108 // AKA MISO
#define BMP183_SDI 109 // AKA MOSI
// You'll also need a chip-select pin, use any pin!
#define BMP183_CS 10
Unfortunately the only print out I get from the Serial is the following:
"BMP183 Pressure Sensor Test"
There is no problem with the sensor because I tested it with an Arduino Uno and it works perfectly.
Any help will be really appreciated!
Best regards
George
BMP183 sensor with Due
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
Which version of the Adafruit_BMP183 constructor are you using? You should be using the hardware SPI version:
Adafruit_BMP183 sensor = Adafruit_BMP183(BMP183_CS);
Adafruit_BMP183 sensor = Adafruit_BMP183(BMP183_CS);
- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
Thank you very much for your quick reply.
I am not currently using the hardware SPI version of the constructor so I will give a try tomorrow with this constructor and I will let you know about the outcome.
Best regards
George
Thank you very much for your quick reply.
I am not currently using the hardware SPI version of the constructor so I will give a try tomorrow with this constructor and I will let you know about the outcome.
Best regards
George
- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
I just tried with this constructor ... Adafruit_BMP183 bmp = Adafruit_BMP183(BMP183_CS);
but what I get is the following:
"BMP183 Pressure Sensor Test"
"Ooops, no BMP183 detected ... Check your wiring!"
I tried with both SPI (http://21stdigitalhome.blogspot.gr/2013 ... e-spi.html) and ICSP (http://arduino.cc/en/Reference/SPI) pins of Due.
Any help will be really appreciated!
Best regards
George
I just tried with this constructor ... Adafruit_BMP183 bmp = Adafruit_BMP183(BMP183_CS);
but what I get is the following:
"BMP183 Pressure Sensor Test"
"Ooops, no BMP183 detected ... Check your wiring!"
I tried with both SPI (http://21stdigitalhome.blogspot.gr/2013 ... e-spi.html) and ICSP (http://arduino.cc/en/Reference/SPI) pins of Due.
Any help will be really appreciated!
Best regards
George
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
I'm going to have to get one of these sensors and try to port the library. It will take me a few days...
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
Download the library and try it now. Should work for both hardware and software SPI modes.
https://github.com/adafruit/Adafruit_BMP183_Library
https://github.com/adafruit/Adafruit_BMP183_Library
- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
Thanks for your help!
Unfortunately it is still not working. Which pins are you using, the SPI or the ICSP?
I am using the SPI and the hardware version constructor.
I am getting the following message:
"BMP183 Pressure Sensor Test"
"Ooops, no BMP183 detected ... Check your wiring!"
Best regards
George
Thanks for your help!
Unfortunately it is still not working. Which pins are you using, the SPI or the ICSP?
I am using the SPI and the hardware version constructor.
I am getting the following message:
"BMP183 Pressure Sensor Test"
"Ooops, no BMP183 detected ... Check your wiring!"
Best regards
George
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
For hardware SPI, you have to use the ICSP pins. You can use pins 11, 12, and 13 with Software SPI
- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
Thanks for your support.
The Software SPI works perfectly! Well done!
On the other hand there is still problem with the hardware one.
I am using this information about SPI pins .... http://arduino.cc/en/Reference/SPI
and I checked connections with a multimeter too.
Best regards
George
Thanks for your support.
The Software SPI works perfectly! Well done!
On the other hand there is still problem with the hardware one.
I am using this information about SPI pins .... http://arduino.cc/en/Reference/SPI
and I checked connections with a multimeter too.
Best regards
George
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
That link isn't working for me for some reason. But here is the ICSP pinout I'm using. Note that there's a small white dot indicating Pin 1 on the Due:
So, you should be using pins 1, 3, and 4- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
Sorry for my delayed reply.
I just made it working with the hardware version by using the SPI pins and not the ICSP. ICSP is just not working.
Thanks again for your excellent and quick support.
Best regards
George
Sorry for my delayed reply.
I just made it working with the hardware version by using the SPI pins and not the ICSP. ICSP is just not working.
Thanks again for your excellent and quick support.
Best regards
George
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
Very strange. It works with my Due on ICSP. Perhaps there is something wrong with your Due?
- gchrist
- Posts: 88
- Joined: Wed Jul 16, 2014 3:40 am
Re: BMP183 sensor with Due
Hello Rick,
I do not know if there is something wrong with my Due.
Could you please have a look also at the following website ... http://21stdigitalhome.blogspot.gr/2013 ... e-spi.html ?
It is noted the following ...
"Pins: Hardware SPI MISO, MOSI, and SCK pins are only on the SPI header (not to be confused with the ICSP header which is different on the Due)"
Thanks again for your excellent support.
George
I do not know if there is something wrong with my Due.
Could you please have a look also at the following website ... http://21stdigitalhome.blogspot.gr/2013 ... e-spi.html ?
It is noted the following ...
"Pins: Hardware SPI MISO, MOSI, and SCK pins are only on the SPI header (not to be confused with the ICSP header which is different on the Due)"
Thanks again for your excellent support.
George
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BMP183 sensor with Due
By golly, you're right! I never noticed that other 2x3 header. I've been using the one labeled "SPI"
Please be positive and constructive with your questions and comments.