Hi.... i have connected in my udooneo board multiple "arduino" sensors to the analog ports and I can read their data. In another experiment i have connected a udooneo brick (Barometer Brick - MPL3115A2) and I can also read the sensor brick data. Still, in the same udooneo board i want to connect both the brick and the arduino sensors and read/write their data simultaneously. Is that possible? In my initial tests i have difficulties in accessing the brick sensor data. Has anybody tested sth similar?
Default the I2C-2 port for brick sensor is assigned to the A9 core so you can read it from Linux. With the device tree editor you can assign it to the M4 core so you read it with arduino. http://www.udoo.org/docs-neo/Cookbook_Linux/Device_Tree_Editor.html On the Arduino IDE there are examples for your brick available that you can use after you have assigned the brick I2C port to the M4 (Arduino)
This code should work after you have set the I2C-2 to the M4 core https://github.com/UDOOboard/Adafru...ster/examples/testmpl3115a2/testmpl3115a2.ino It should not be difficult to combine this code with reading other analog sensors.
thanks for your help. In the http://www.udoo.org/docs-neo/Cookbook_Linux/Device_Tree_Editor.html link it is mentioned that: " I2C-2: SNAP-IN Bricks connector By default the snap-in connector is assigned to the A9 and it’s possible to control it by Linux driver. The I2C signal are also available on SDA - SCL pins and on pins 36/37.If you need to use this on the M4 Arduino core, you need to remove it from the A9 core, right-clicking on the corresponding pins and removing it. After a reboot it will be possible to connect an external I2C device to the SDA SCL pins and control it from the Arduino M4 core." From the above i derive that i cannot use simultaneously the brick ( A9 core ) with the analog sensors ( Arduino M4 core) , only if i will assign the snap-in connector to the other inputs ( SDA - SCL pins and on pins 36/37) and control it from the Arduino M4 core. Both A9 and M4 cannot work the same time. Right?
Indeed, you cannot use them on A9 and M4 at the same time. I stream the values I read on M4 to the A9 with the Serial.
i can see in the http://www.udoo.org/docs-neo/Hardware_&_Accessories/I2C_bus.html link that the Snan-ip Bricks connector can be attached only On the J10 connector (I2C 2 bus). Am i right?
The UDOO bricks can be chained. Note that the connectors are directional. I guess the UDOO bricks will all have a unique I2C address. If you want to connect two bricks of the same type you'll have to check how to change the brick's I2C address.
What do you mean two bricks of the same type? Two identical bricks? The point for me is to connect many udoo bricks of different sensors in the same board and to act (send/receive) data simultaneously ( for example a temperature brick, a light brick and a humidity brick) . I suppose these bricks are different.
From the Udoo shop: But I believe that it is not possible to change the I2C address of the current Bricks (do not know about the new Bricks) so it is not possible to use for example 2 temperature bricks.
If UDOO Bricks work along a cascade configuration, so you can attach them all together without wasting space in a truly intuitive way, has anyone tried to work with different type udoo bricks and take measurements? I have also asked Andrea Robai for this scenario.
Hey guys, I want to use the Barometer Brick to get the temperature over the M4. I already used the Device Tree (http://www.udoo.org/docs-neo/Cookbook_Linux/Device_Tree_Editor.html) to assign it to the M4 and can read the data just fine. My Problem is, that I want to stream the Data to the A9 via the serial communication (http://www.udoo.org/docs-neo/Arduino_M4_Processor/Communication.html). I used the java serial bidirectional example as a guideline (http://www.udoo.org/docs-neo/Serial_Libraries/Java_Serial_Libraries.html) and can get data from the analog or digital pins. Now the Barometer Brick also uses a Serial communication and it messes up my bidirectional setup. Is there another way I can get the data from the Brick or am I missing something entirely else?
The bricks use i2c, not serial, so there isn't any messing up. If you need to send commands from the A9 to the barometer brick for some reasons you should send them over the serial to the M4, whereas you interpret the data and issue the corresponding commands.
Yes you are right, I got confused on the Serial part. I am currently sending commands from the A9 to the M4 (eg. turn on/off Pin 13) and now I want to command the M4 to check the barometer brick. But as soon as I implement the code for the brick all I receive from the M4 is "null" and the Udoo freezes I think. I think I am maybe missing something and a little bit of tinkering is all that's required.
I found the error I made. I forgot to include: Code: if (! baro.begin()) { Serial.println("Couldnt find sensor"); return; } now everything works just fine, thanks for your quick reply Maurice
Hey guys it is me again, I have run into another problem. When I want to just read the pressure value (float pascals = baro.getPressure(); ) I receive the right value (1000 hPa). When I want to read the pressure value and the temperature value (float tempC = baro.getTemperature(); ) I get the right value for the temperature (~21*C) but the pressure value is way to low (~0.3 hPa ). (when I first check the value of the pressure and then the value of the temperature the first value for the pressure is correct but every value after that is the same bogus value) By what is this problem caused and is there a way to fix it? EDIT: Seems like I found a workaround to the Problem: Instead of just checking the value that I would like to know I can update all values and then check only the one I need. It is not the best solution but it works.