Arduino Serial.WriteString issue

101 views
Skip to first unread message

chris...@gmail.com

unread,
Sep 14, 2020, 9:49:48 PM9/14/20
to E-Prime

TL/DR: All three serial settings (device manager, E-prime, Arduino firmware) are the same but Eprime can't communicate via Serial.WriteString and Serial.ReadString. Any suggestions?
----------------------------------
I used https://osf.io/cuzj5/ as a template to program an Arduino Mega to control an electrical stimulator. On the Arduino side, if I send four comma-delimited parameters using the Serial Monitor, everything works as expected. 

Trying to send the same strings using E-Prime does "nothing".
If I watch the Rx/Tx lights on the Arduino, it blinks around the time E-Prime should be sending the information across the serial port, but nothing happens (no stimulator fires, and no "feedback" from the Arduino; i.e., Serial.ReadString(incomingText) never receives anything). Paradoxically, if I change Serial.begin(115200) to Serial.begin(9600) on the Arduino and leave everything else at 115200, Serial.ReadString(incomingText) is no longer empty which again implies that something was received.

(Note: Some languages [e.g., R, Matlab] don't play nice when the Object name is the name as its Class. So I tried renaming Serial to Arduino even though I'm nearly certain this is not an issue for Visual/E Basic).

I've attached a screenshot showing the Serial Port settings for the Device Manager, EPrime, and the Arduino. I'm sure the issue lies somewhere here but I haven't had any luck. 

To top off the frustration, about 8 months ago we ran https://osf.io/cuzj5 (i.e., the template our program was based on) on exactly the same Arduino and E-Prime computer without issue.

Has anyone else encountered a similar issue or know of a workaround?
Thanks!



asdfasdfCapture.PNG

Spape, Michiel

unread,
Sep 15, 2020, 4:28:49 AM9/15/20
to e-p...@googlegroups.com

Hi,

The Arduino is, I take it, connected via USB or such, so you’re trying to send via E-Prime a signal over the Arduino to the electrical stimulator?

I’ve no answers for you here, but I found that the last time I tried to use a USB to serial cable in Windows, I couldn’t get it to work, so if you ask E-Prime support, please do post your answer here!

You could try to use the serial port directly, if you have one, it pretty much works without fail.

Best,

Michiel

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/24a01245-c49d-4f97-b58b-fe501de675b5n%40googlegroups.com.

Chris Blais

unread,
Sep 15, 2020, 5:07:28 PM9/15/20
to e-p...@googlegroups.com
Hi Michiel,

If you're asking whether there's one of these:
The answer is no. I've only tried connecting a few different Arduino UNO/MEGA boards from a couple of different vendors. 
I've tried on both a fully up to date Win 7 pro and a Win 10 enterprise system. The Win 7 system is the one that had been working, and as far as I can tell there haven't been any hardware related updates since it was working ~8 months ago.
I'm running E-Prime v2.10.0.356 if that matters.

Working on implementing something like this to at least be able to monitor whatever e-prime is sending by using the Arduino Sketch Monitor 

-------------------------------
Chris Blais PhD
Assistant Research Professor, Department of Psychology
Barrett Honors Faculty
Arizona State University


You received this message because you are subscribed to a topic in the Google Groups "E-Prime" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/e-prime/byARuBAAS2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to e-prime+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/HE1PR07MB43466B97D891AA1DE0D8086CFA200%40HE1PR07MB4346.eurprd07.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages