Arduino yun and I/O expansion shield compatibility


hi all

for actual project need use  rs485 arduino yun , decide use i/o expansion shield v5 .

i've tested sketch uno , works fine. when use on yun i've problem.
i see data coming via serial monitor not rs485 interface. there problemshield yun/leonardo?
there's something  modify make works?
or in alternative ther rs485 shield works yun ?

thank help

hi  all,

about problem:

of course, in i/o expansion v5 move 3 jumpers select rs485.
after reading lot of documentation regard yun, understand arduino, arduino leonardo different respect oldest arduino. have read there can problems if use spi library.... don't use it.....
in theory should use rx, tx, , digital 2 pin..... , use serial1 class in firmware....

i used first example code shield's wiki doc test (appropriately modified) , first on arduino uno (the original code) , on yun (the modified code), , while first works ( can see trough rs485-usb interface pc letter a), yun can see ff packets ( think noises)

anyway modified sample code used:

code: [select]
#include <bridge.h>
#include <console.h>
#include <fileio.h>
#include <httpclient.h>
#include <mailbox.h>
#include <process.h>
#include <yunclient.h>
#include <yunserver.h>

int en = 2; //rs485 has enable/disable pin transmit or receive data. arduino digital pin 2 = rx/tx 'enable'; high transmit, low receive

void setup()
{
 pinmode(en, output);
 serial1.begin(9600);
 serial.begin(9600);
}

void loop()
{
// send data
 digitalwrite(en, high);//enable data transmit
 serial1.print('a');
 serial.print('a');
 delay(1000);
}

i use  the serial class  for serial monitor (otherwise wouldn't see on monitoring program) , serial1 class use rs485 interface on shield.

edit:

found  this older topic :

http://forum.arduino.cc//index.php?topic=190709.msg1422995#msg1422995

in topic have change pin connections and, moreover, can't use @ same time linino , ttl serial (tx, ad rx ) :

quote
this brings serial1.  serial1 hardware uart can use, connected pins d0 , d1.  you use communicate xbee shield, altough wouldn't recommend it, pins used bridge communications (between "arduino" , "linux").  if want used these pins anyways , not use linio, leonardo.  eats less power , it's cheaper.


my project should collect data sent via rs485, store them on sd , send them remote server. choose arduino yun since integrates of these features ...
but if can not use @ same time linino , serial rs485 strong limitation project .....

you have advice on this?

thank help


Arduino Forum > Products > Arduino Yún (Moderator: fabioc84) > Arduino yun and I/O expansion shield compatibility


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support