How can I set up a communication from Medusa mini via RS232?

Post here to discuss all things Arduino!

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Keniey
newbie
newbie
Posts: 1
Joined: Wed Apr 12, 2017 6:01 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

How can I set up a communication from Medusa mini via RS232?

Post by Keniey » Wed Apr 12, 2017 6:07 pm

I'm trying to set up a communication from Medusa mini to a Gadgeteer Board via RS232 but I have problems to write to RS232 on the Medusa Mini (Arduino newbie).

Code: Select all

#include <Wire.h>
#include <SPI.h>
#include <Gadgeteering.h>
#include <Mainboards/FEZMedusaMini.h>
#include <Modules/RS232.h>

using namespace gadgeteering;
using namespace gadgeteering::mainboards;
using namespace gadgeteering::modules;

fez_medusa_mini board;
rs_232* my_Rs232;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  my_Rs232 = new rs_232(2);
  my_Rs232.write("Hello World");
}
I get the the errormessage:
Arduino: 1.6.5 (Windows 8.1), Platine: "FEZ Medusa"

Medusa_Mini_RS232_Test.ino: In function 'void setup()':
Medusa_Mini_RS232_Test:39: error: request for member 'write' in 'my_Rs232', which is of pointer type 'gadgeteering::modules::rs_232*' (maybe you meant to use '->' ?)
request for member 'write' in 'my_Rs232', which is of pointer type 'gadgeteering::modules::rs_232*' (maybe you meant to use '->' ?)

How can the string be sent?
Another question: how can the RS232 module be configurated different from the defaults:

Thanks in advance, Keniey

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How can I set up a communication from Medusa mini via RS

Post by Chuckt » Fri Apr 14, 2017 3:17 pm

Is there a way to select the stop bits and parity?
I just remember it from my modem days from the 80's. There are more than one type of RS232. It also depends on how you set the parity and stop bits.

http://forum.arduino.cc/index.php?topic=15615.0

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How can I set up a communication from Medusa mini via RS

Post by brad » Sat Apr 15, 2017 10:03 pm

It seems this question was solved here:
https://www.ghielectronics.com/communit ... c?id=24233

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 2 guests