INDIO industrial not comunicating Serial, while the proto does ?.

Strange issue , Serial communication  works fine with Proto Board, but not with Industrial version.
But first :

  • I am aware of that the pin numbering differs between Proto and Industrial
    So I changed code on industruino to to use Ch 1,2,3,4 instead of protoboard 4,5,6,7 for my hardware inputs
     
  • I am aware of some weird issue where (both) of these type of devices kinda picks randomly a COM port number,
    I fixed at the C# side, but would rather see the next available Port is used (i'm allready at COM11 now after a few sketch updates)
     
  • I used the .inf file to instal the industrial board, and didnt alter anything afterwards.


At industruino side the code goes like :

 Serial.begin(9600); //Start serial communication boud rate at 9600  (in setup)

//...inside main loop :
   if(Indio.digitalRead(1)==LOW )  
   {
     Serial.print("A\n");   //never executes
}


 

Peter
Peter
7
| 2 1 1
Asked on 10/20/17, 1:54 PM
0
vote
5410 Views

Hi Peter, not sure which MCU versions you are using, but in case you have a D21G, the Serial communication over USB uses the name "SerialUSB" (different from 32u4 and 1286 were it was "Serial"). Please refer to 2nd paragraph at https://github.com/Industruino/libraries
Tom

 

Tom
Tom
5675
| 1 1 3
Answered on 10/22/17, 11:36 PM
0
vote

OK i got confused as the example code still used normal serial for debug purposes, maybe that code needs adjusting too : https://github.com/Industruino/democode/blob/master/IndustruinoDemoCode_D21G/IndustruinoDemoCode_D21G.ino

Peter
on 10/23/17, 10:08 AM

Thanks Peter, you are right, i have corrected that now.

Tom
on 10/23/17, 10:30 AM

I was under the impression that the protoboard was a D21G and i used serial in the sketch ??
Could you perhaps per version, give an example as to me its not clear what our company buyer bought.
So that i can tryout each example, and know the version

Peter
Peter
7
| 2 1 1
Answered on 10/23/17, 6:20 AM
0
vote

Hi Peter, if you're not sure which version you have, you can remove the casing to have a look at the topboard. If it has a coin battery holder on its back (for RTC) then it is a D21G. Otherwise it says 32u4 or 1286 on the top. Uploading will only be successful if you select the correct 'board' in the Arduino IDE. Using a D21G, replace any Serial with SerialUSB in your sketch.

Tom
on 10/23/17, 6:27 AM

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

41 follower(s)

Stats

Asked: 10/20/17, 1:54 PM
Seen: 5410 times
Last updated: 10/23/17, 6:20 AM