I suppose this will be a future initiative, but it would be good if at some point we could add other devices to the Smart Citizen Platform such as the Air Quality Egg. It also has a MAC address and connects via connected Ethernet cable (the base egg). Currently the AQE sends to Cosm, but I think it would be pretty straightforward to direct the data to SC, or to both.
The question would be if we take directly from Cosm, or work on a different firmware for AQE and other devices (just like Cosm has the base firmware), maybe is something they want to do. Open sense: http://open.sen.se takes Cosm feeds or independent devices. I sent emails to Usman and Ed about our launching, no response yet.
What about using the I2C to add more sensors? CO2, Particulates, UV radiation, and various Organic Compounds?
-Matt
Hi Matt
It should be already possible. Just be aware that you should use 5V sensor in the kit v1.0 or 3.3V sensor in v1.1. If not the case, use an adaptor (it should be fairly easy)
Then you should rewrite a bit the code to read this sensors. we miss time to write it ourself but for sure we will be able to give you a hand here.
About displaying those data on the server, we are in the process of rewriting the database infrastructure to be more efficient and flexible. We should then be able to accept those data coming from i2C sensors (and also other devices).
Meanwhile, you can already store those value on to the SD card or send it to a custom server.
Best
A
Cool, thanks. I’ve ordered a few new sensors from SparkFun. I’ll keep you posted on the results.
-Matt
Yes, please! Keep us informed.
My first impression when joined Smart Citizen was… only the Arduinos can update on the map? Given there is a RESTFul interface would require very little effort to add the ability to support virtual (software) devices, provided they are allowed/disable by a quota policy like Twitter (like up to X POSTs within a minute).
In addition, I would like to see how can I query the map to be able to provide analytics - for instance, “as a student I want to know what are the top ten smart cities by the universities population, smart citizens arrivals and weather conditions”.
Connecting data others than sensors value is an option that may also be available in the future, and should come as well with the new DB structure. but the data sources will have to be selected carefully by the community to not overcrowd the website with useless data.
Hi, i know this thread is old, but i am planning to add extra sensors via i2c (actually connect a slave arduino with many sensors). I already digged into the firmware code, and i think i can easily handle the extra data.
I have a question tho: how to access the 2 i2c channels ?
Do i have to use Serial2 and Serial3 ?
or should i go with Wire (and using which pins number) ?
Thanks !
Best Regards,
Thomas
Hi @mgr37
Adding extra sensors and connecting them to the platform is something we work a lot to make it easy on the upcoming SCK 1.5.
However as you already know the SCK 1.0 and 1.1 accept new sensors and devices using I2C.
You can read more about here:
https://docs.smartcitizen.me/#/start/inside-the-sck (Loo for I2C EXPANSION BUS)
For it you need to use the Wire library and address them by having a different address on each sensor. Many sensors have a pin to select the address or the manufacturer provides different versions each one with a different address.
However you won’t be able yet (till SCK 1.5 comes out) to push data from new sensors to the platform. Instead you will need to store it on to the SD Card.
You can see here an example from the <a href="“http://opensourcebeehives.net/”>Open Source Beehives team:
Here we use the expansion port to connect 2 x DS18B20. This are waterproof temperature sensors to measure the temperature inside the beehive.
https://www.adafruit.com/product/381
You will see here the sensor is not even I2C but we stop the bus. Read the sensor using the I2C pins but using 1-Wire protocol instead and then we load back Wire library for the bus to keep working.
As you might see at the moment it is not super easy but it’s fun to learn.
Good luck!