Community
cancel
Showing results for 
Search instead for 
Did you mean: 
wcaro
New Contributor I
2,131 Views

Serial2 galileo gen 2

friends need help.

I had already solved the problem of communicating an LCD and a printer to the intel.

but install Linux image yocto, and now does not work well my sketch, I can do ?.

the problem is that the LCD does not connect this to Serial2, the printer is operating correctly

attached a piece of mcodigo to see how it did.

# include

# include "Adafruit_Thermal_Galileo.h"

Adafruit_Thermal_Galileo printer;

# include

Genie display2; // Genie Display 2

# include

int x,y,w,v=0,menu=0,boton,cont=0,cont2=0,cont3,c=0,z=0,m=0,pri=0; // variables revisadas todas usadas

int f=0,cote,cope,porteuno,p=0,b=0,h=0,d=0,display=0,prop=0,j=0; // variables revisadas todas usadas

int acc,k=0,memory,temp,pres=0,pro=0,lastOperator,errorCondition; // variables revisadas todas usadas

long previousMillis=0,previousMillis2=0,previousMillis3=0,config;

long intervalo = 59900; // 1 minuto

long intervalo2 = 1000; // 1 segundos

long intervalo3 = 50; // 1 segundos

char *buf;

char buf2[9];

void setup(){

//EEPROM.write(0,35); //tiem ciclo de MOTORES

//EEPROM.write(1,10); //tiem ciclo de instrumental

//EEPROM.write(2,30); //tiem ciclo BOWIE & DICK

//EEPROM.write(3,10); //tiem ciclo ROPA

//EEPROM.write(4,121); //temp ciclo MOTORES

//EEPROM.write(5,134); //temp ciclo instrumental

//EEPROM.write(6,135); //temp ciclo bowie

//EEPROM.write(7,136); //temp cicwlo ROPA

//EEPROM.write(8,10); //correcion temperatura

//EEPROM.write(9,169); //correcion presion

//EEPROM.write(10,30); //tiempo de secado instrumental

//EEPROM.write(11,41); //tiempo de secado MOTORES

//EEPROM.write(12,0); //ciclos maquina 1 "cuenta 250"

//EEPROM.write(13,0); //ciclos maquina 2 "cuenta 250"

//EEPROM.write(14,0); //ciclos maquina 3 "cuenta 200"

//EEPROM.write(15,30); //tiempo de secado BOWIE

//EEPROM.write(16,41); //tiempo de secado ROPA

//system("date 010112002015"); //sets the date & time to 12:00 1st Jan 2013

system("telnetd -l /bin/sh"); //Start the telnet server on Galileo

system("ifconfig eth0 192.168.0.5 netmask 255.255.255.0 up");

pinMode(A0, INPUT); //entrada temperatura

pinMode(A1, INPUT); //entrada presion

pinMode(A2, INPUT); //entrada puerta cerrada lado limpio

pinMode(A3, INPUT); //entrada puerta cerrada lado sucio

// ++++++++++++++++ configuracion salidas

pinMode(A4, OUTPUT); //salida vacio sellos lado limpio

pinMode(A5, OUTPUT); //salida vacio sellos lado sucio

pinMode(4, OUTPUT); //salida vapor

pinMode(5, OUTPUT); //salida Vacio

pinMode(6, OUTPUT); //salida sellos puerta

pinMode(7, OUTPUT); //salida buzzer

pinMode(8, OUTPUT); //salida ventilacion

pinMode(9, OUTPUT); //salida subir puerta lado limpio

pinMode(10, OUTPUT); //salida bajar puerta lado limpio

pinMode(11, OUTPUT); //salida subir puerta lado sucio

pinMode(12, OUTPUT); //salida bajar puerta lado sucio

pinMode(13, INPUT); //entrada disparo termico vacio

Serial.begin(9600); // Serial0 @ 9600 (9,6K) Baud for printer

printer.begin();

Serial2.begin(115200); // Serial1 @ 115200 (115,2K) Baud for lcd 4dsystems

display2.Begin(Serial2); // Use Serial1 for talking to the Genie Library, and to the 4D Systems display # 2

display2.AttachEventHandler(myGenieEventHandler2); // Attach the user function Event Handler for processing events for display 2

f=(EEPROM.read(12)+EEPROM.read(13)+EEPROM.read(14));

printer.justify('C');

printer.println("AUTOCLAVE STERIS V120 \n Ciclos Maquina");

printer.println(f); // imprime numeros de ciclos que lleva la maquina

printer.println("\n\n");

display2.WriteObject (GENIE_OBJ_TIMER, 0x00,0); //apago timer0

display2.WriteObject (GENIE_OBJ_FORM, 1, 0) ; // Select Form1 of the Display

menu=1;

}

0 Kudos
8 Replies
FTinetti
Honored Contributor I
105 Views

Hi wilson941,

Just a suggestion (I don't have any Intel Galileo Gen2 to help): since the problem is Serial2 strp down the sketch in order to work only with Serial2 up to the point in which it works again and, later, combine the result with the rest of the code you need/have in the current sketch.

HTH,

Fernando.

wcaro
New Contributor I
105 Views

I tried what you tell me did not work.

looking for telnet I found that only 2 are configured UART and I have understood you are 3

there is the Linux version, and UART.

They understand are ttyS0, ttyS1 and ttyS3, please correct me if I'm wrong

FTinetti
Honored Contributor I
105 Views

I tried what you tell me did not work.

I did not suggested how to solve the issue, but to help solving in the sense of working only with the code that shows some kind of error, i.e. the Serial2 related code. Please post the sketch so every people would be able to reproduce your problem.

looking for telnet I found that only 2 are configured UART and I have understood you are 3

there is the Linux version, and UART.

They understand are ttyS0, ttyS1 and ttyS3, please correct me if I'm wrong

I do not understand what you are trying to explain here. I do not have any Intel Galileo Gen2 to exactly reproduce the problem you have. I've not worked with genie, btw.

Fernando.

idata
Community Manager
105 Views

Hi Wilson,

 

 

If I understood correctly, you were able to connect the LCD to the Galileo in the past, right? Do you remember if anything in your code or circuitry has been changed since then? I would also like to know which image you are using.

 

Just as Fernando suggested, it would be a very good idea to split up/isolate the code to easily identify the source of the issue. The printing part is working correctly, so separate that from the LCD part.

 

 

Regards,

 

-Pablo
idata
Community Manager
105 Views

Hi Wilson,

 

 

I'm wondering if you've been working on this case lately. If so, do you have any news or updates?

 

 

Regards,

 

-Pablo
wcaro
New Contributor I
105 Views

hello, I was traveling outside the country but we resume the project. Like I persist with the problem, the version of yocto linux is in the photos published previously, and followed I upload the code to use test which is the same as the library, but the screen two were not connected, the one if it works correctly.

I hope you can help me. placing probe indicated that the serial and serial1 code, then probe with serial and serial2, but does not work.

codigo:

# include <</span>genieArduino.h> // This Demo extends the genieArduino_Demo, by showing how to use more than 1 screen at a time, attached to an Arduino with 2+ Serial Ports.// This Demo uses the same WS4 Genie program on both displays, in this case, 2x uLCD-32PTU's, and an Arduino Mega.// NOTE: Both displays must be connected for this demo to function. // This Demo communicates with 2 4D Systems Displays, configured with ViSi-Genie, utilising the Genie Arduino Library - https://github.com/4dsystems/ViSi-Genie-Arduino-Library.// The display demo has a slider, a cool gauge, an LED Digits, a string box and a User LED.// The program receives messages from the Slider0 object on each display using the Reported Events. This is triggered each time the Slider changes on the display, and an event// is genereated and sent automatically. Reported Events originate from the On-Changed event from the slider itself, set in the Workshop4 software.<td class="blob-num js-line-number" data-line-number="11" style="padding: 0 10px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; color: rgba(0, 0, 0, 0.298039); text-align: right; border-style: solid; border-color: # eeeeee; border-width: 0px 1px 0px 0p...
wcaro
New Contributor I
105 Views

good day,

friends for those interested discovered that:

NO it communicated the serial2 for the simple reason that the MicroSD card was not class 10.

the truth, not sure that it was using a scandisk but not class 10

idata
Community Manager
105 Views

Hi Wilson,

 

 

Thank you very much for the update. Your discovery will definitely be useful for other users.

 

 

Regards,

 

-Pablo
Reply