New to the community of makers and hardware hackers.
I am currently undertaking the momentous task of automating my self designed modular aeroponic grow system over the summer. I am going to be using an open source IoT framework which is found here Common Garden IoT Framework.
Now on to the fun stuff, I have not been able to find an existing wiring diagram, I hate to admit that I am that visual, but it very much helps in understanding and learning for me.
Just for reference I am using this code as a test to get sensor values. Github BMP280
If you are using SPI - which I gather from your use of A4 & A5 - you seem to be missing the connections on A2 & A3
As the comment in the code would suggest
@Cloud, there is already a web IDE library for the BMP280. I also suspect that the shield shield is not needed but I’ll need to look at the Adafruit module to confirm.
Are the D0/D1 interchangeable on the shield-shield remapping? So I can use either in their respective corners?
Also if I wanted to change the pinout would I need to change it in the BMP280 library itself?
Thanks for your patience answering these when you get to them, help me keep my sanity.
I will also give it a shot with the added A2 and A3 connections as reccomended in , and go directly from the particle’s risers on the side of the photon on the shield.
One clarification, I don’t need any resistors in any of the data lines or clock feed?
I'd say you could use either of the three locations where you find D0/D1 on the shied. I think the main difference betweene the locations is if there is level translation performed on these or not.
Nope - I2C is I2C no matter which set of pins you'd be using for it.
If you want to use SPI (A2~A5 - which are also on the shield headers - look at the Particle pin names on the bottom of the shield) you'd need to use the respective constructor in code.
But if you don't need the shield don't use it.
You don't need them for this sensor board as it brings its own pull-ups.
One item that may help with the connections is a screw terminal board like https://www.controleverything.com/content/I2C-Master?sku=PESCREW it is made for the Particle Electron but will also take the Photon and makes it easy to connect you module. They also have some particle code that may help you.
Adafruit is a good source of code and tutorials (as well as Photons and things that work with Particle boards).
Looking more closely at the picture at the beginning, you have an SPI version of the BMP280.
SDI (SPI Data In) connects to MOSI (Master Out Slave In) A5 on Photon
SDO (SPI Data Out) connects to MISO (Master In Slave Out) A4
SCK connects to SCK (Serial Clock) on A3
CS (Chip Select) connects to SS (Slave Select) on A2
EDIT: Actually, that board can be either, and in I2C mode:
SCK connects to SCL (I2C Clock) on D1
SDI connects to SDA (I2C Data) on D0
I did notice that you ask about the BMP280 and the code uses BME280 they are similar, but I would have to check that the address is the same for both chips.
Also the particle.publish will allow the 4 publishes in one second, but may make you wait before you send another four. I normally put delay(1000) between each publish. I am still new to the photons and particle in general but that is what I read and after I did that I stopped having problems publishing my information.
Chuck
I think what @ScruffR said is on point, I did check the address with a serial scan and its a 00x76 address, the library defined it as 00x77. Will give it another go this AM.
That's correct. After a burst publish of four events you'd have to wait at least for seconds for the limit to lift.
But the better solution might be to incorporate all your data into one publish
e.g. like this
OK, I got a case of what am I doing wrong, I can NOT import a library to particle build no MATTER how I have tried to modify it.
Originally it was only telling me I was missing data fields in README.md
Now it is telling me nothing is even there?
Also is it not just as trivial as renaming core files and their includes?
I actually kind of gave up on the particle dashboard and using it from these struggles, I plugged in my Arduino UNO and INSTANTLY had a BMP280 working, connected a wifi serial device and INSTANTLY had it talking with my raspberry pi!
This may not help, but it has caused me problems in the past.
With some of the Adafruit libraries I have to put include /Adafruit/Adafruit_BMP280_Library (add an extra /Adafruit) for the code to compile correctly.
When using the dashboard and a few other things like Mobicle.io, they don’t always play well with internet explorer (sometimes it does play at all), when in doubt always try chrome. My default is still IE only because that is what I have to use for work.
Mobicle I believe will work with any particle board (photon or electron) and shows the variables, allows function calls and installs buttons. It works on windows, apple IOS, and Android.