Forum >I/O Shield and YUN + Bridge library +PM laser sensor
ArduinoGeneral

I/O Shield and YUN + Bridge library +PM laser sensor

userHead rva 2015-04-26 10:07:47 2111 Views0 Replies
I have an I/O expansion shield , a Yun , and a PM laser sensor that uses serial communication ( SEN0177 )

I have found a incompatibility with the "bridge" library of the Yun It can't work together : if the sensor is plugged via its serial adaptor and a Yun sketch uses the "biddge" library (usefull: http://www.arduino.cc/en/Reference/YunBridgeLibrary) , the sketch will crash on the yun.
See this issue : https://github.com/arduino/Arduino/issues/3034

I was told this :
"This is sending/receiving on the serial port making all serial communication bogus. Please move communication with this sensor to SoftwareSerial - and please leave this issue open for now: You did not ran into some bug, but a documentation issue: When using the bridge do not use serial communication to sensors or actuators on the same interface!"

And found that the ports TX and RXon the yun practically can not be used by a shield or anything because they are already used by the Bridge library through the class Serial1 for communication between 32u4 and AR9331

in fact DFrobot you should use Yun SoftwareSerial http://www.arduino.cc/en/Reference/SoftwareSerial in your library