Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Arduino Software serial not working when jevois plugged in to USB power only

0 votes

I've got my code working perfectly with a software serial when the Jevois is plugged into my computer with the data USB cable. But when I use the power cable only, it doesn't work.

I have this for my init.cfg:

setmapping2 YUYV 320 308 30.0 YUYV 320 240 30.0 JeVois TensorFlowEasy

# I also tried setmapping 35

setpar serlog Hard

setpar serout Hard

setpar serstyle Normal

streamon

When I run my Arduino sketch, no data appears in the software serial. It shows these init messages but then nothing else:

ING TensorFlow9:operator()9 Using modf⸮ from /jevo⸮s/share/teosorflow/cig`⸮ette_butts/⸮odlti
IFTnFlwoevr)U⸮Z⸮b⸮⸮⸮⸮́2ɽ⸮⸮R⸮ٽ⸮ͽ⸮⸮⸮ɕ⸮⸮⸮⸮ͽə⸮⸮ݽ⸮⸮⸮ɕ⸮ѕINF VensorFlow:: ⸮ɅѽɡJ⸮⸮⸮⸮ͽ⸮́⸮⸮⸮⸮ʊj
INF TeosorFlow::opf⸮ator(): N⸮V⸮.⸮⸮⸮⸮⸮⸮j
INF TensoqClow::operphi_e⸮ͱʒ⸮⸮b⸮b⸮b⸮j
INC Tf⸮sorFlowoetresFo⸮'⸮ ⸮ɅѽɡJ⸮⸮⸮⸮j⸮⸮⸮⸮⸮⸮⸮⸮Y⸮z⸮⸮⸮⸮"}⸮⸮E⸮ 7Mbl1ov_E⸮⸮ѡݥ͕⸮"⸮⸮ѡݥ͕}⸮5⸮⸮⸮⸮ͱ⸮⸮⸮⸮b⸮b⸮b⸮j
INC TensorFnow=:operatoq()1:Mewt/o2U⸮⸮⸮⸮⸮ݥ͕⸮⸮⸮⸮⸮⸮⸮ͱ⸮⸮⸮⸮⸮b⸮⸮⸮⸮⸮netV⸮⸮K⸮⸮⸮⸮⸮⸮Y⸮z}⸮⸮⸮"}⸮z⸮⸮ٽ⸮⸮ѥ⸮⸮}⸮⸮⸮ͱ⸮⸮b⸮b⸮b⸮j
INF Ten⸮K⸮⸮⸮⸮⸮z⸮⸮rator(): 33: SK⸮⸮⸮⸮⸮⸮Y⸮ze}⸮⸮⸮⸮⸮⸮⸮Y⸮z
⸮⸮⸮⸮"}ł⸮⸮⸮Y⸮z⸮⸮⸮⸮⸮⸮⸮Y⸮z⸮⸮⸮⸮"}Ś⸮⸮⸮thwise/Ru 03,100
NTk⸮⸮⸮⸮⸮⸮⸮z⸮⸮ɅѽɡJ⸮⸮⸮⸮j}⸮⸮⸮⸮⸮⸮⸮V1/MobilenevW1/n21⸮E⸮⸮ѡݥ⸮
R⸮⸮U⸮ͽ⸮⸮⸮⸮⸮⸮z⸮⸮ɅѽɡJ⸮⸮⸮⸮j⸮⸮⸮⸮⸮⸮⸮⸮Y⸮zj⸮⸮⸮⸮-⸮⸮⸮Y⸮z⸮⸮⸮⸮"}⸮hs/l 41,10,
⸮⸮U⸮ͽ⸮⸮⸮⸮⸮⸮z⸮⸮ɅѽɡJ⸮⸮⸮⸮j⸮⸮⸮⸮⸮⸮⸮⸮Y⸮zj⸮⸮⸮⸮⸮⸮⸮⸮Y⸮z⸮⸮⸮⸮"}⸮⸮E⸮⸮ѡݥ⸮e⸮Vѡݥ͕}biaq\ 512, 1 0. 0
INF JeosorFlow:: ⸮ɅѽɡJ⸮⸮⸮⸮j⸮⸮⸮⸮⸮⸮⸮⸮Y⸮}j⸮⸮⸮⸮⸮⸮⸮⸮Y⸮}⸮⸮⸮⸮"}⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Y⸮ze⸮⸮⸮⸮⸮⸮⸮⸮Y⸮z⸮⸮⸮⸮"}⸮⸮⸮⸮⸮⸮ݥ͕⸮⸮⸮ٽ⸮⸮ѥo7_bias⸮⸮⸮⸮⸮b⸮b⸮b⸮j
R⸮⸮U⸮ͽ⸮⸮⸮⸮⸮⸮z⸮erator4): 859 finav_resuft, 246 1, 0. 0
ITnrl

This is how I've set up the software serial:

#include <SoftwareSerial.h>

SoftwareSerial jevois(2, 3); // Arduino RX, Arduino TX

void setup() {
  jevois.begin(115200);
  jevois.setTimeout(500);

}

(Background on why I used software serial - #define SERIAL Serial1 doesn't work for me. It says Serial1 is not defined)

I tried initialising jevois inside setup:

    jevois.println(" setmapping 35");
    jevois.println("setpar serlog Hard");
    jevois.println("setpar serout Hard");
    jevois.println("setpar serstyle Normal");
    jevois.println("streamon");

I get errors like this:

ERR Unsuppo⸮ted commanf [ setmapping 35]

ERQ UnsupportY⸮⸮⸮⸮⸮⸮⸮⸮⸮o⸮⸮⸮ѵ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮H⸮OK

ERR Unsupporved command Y߷⸮⸮ѵ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮H⸮OKOK

ERR Uwsupported c⸮⸮+⸮⸮⸮⸮5⸮ɕ⸮⸮⸮⸮]C⸮

Seems like the commands are possibly getting garbled? I also notice if I plug the data cable in that the data seems to get distorted a fair bit - special characters appear. 'typos' show in the logs 

TO tulipsTO tv⸮ips
TO tunips
TO tulips
TO tulips
TO tulips
TO tv⸮ips
TO tulipq
TO tulips
TO tulipq
TO tv⸮ips
TO tv⸮ips

asked Apr 20, 2019 in Hardware Questions by jeznag (120 points)

1 Answer

0 votes

yes, the JeVois console has no tolerance for typos or syntax errors...

In your first example, your setmapping2 syntax should be:

setmapping2 YUYV 320 240 30.0 JeVois TensorFlowEasy

since with setmapping2, which is for headless mode, you only specify a camera resolution, but there is no USB output resolution, as there is no video sent to USB.

Now when you use setmapping, that should work, you just need to remove the extra space you had before the command. You had " setmapping 35" and should replace by "setmapping 35" (remove the space before "s"). But note that this one will now wait until someone starts grabbing the video over USB before it starts producting outputs (non-headless mode).

Your serial output looks severely garbled. Are you using an arduino running on internal clock (no crystal oscillator)? Maybe software serial is not able to keep up on your arduino, or its clock is not precise enough. You could try to change the baudrate to 9600 and see whether that improves. See

http://jevois.org/doc/UserSerial.html

for how to do this by editing JEVOIS:/config/params.cfg on the microSD card.

answered Apr 22, 2019 by JeVois (46,580 points)
...