FicsitRemoteMonitoring icon indicating copy to clipboard operation
FicsitRemoteMonitoring copied to clipboard

Unable to receive data from serial

Open michele-grifa opened this issue 2 years ago • 8 comments

I installed the mod and ArduinoKit to interface an Arduino Uno via Serial, but for some reason, it doesn't receive nothing. The configuration for the serial port is correct and i have done the /frmserial start command. Is there an example to read the getProdStats JSON.

The Arduino Script

void setup() {
  Serial.begin(9600);

}

void loop() {
  if(Serial.available() > 0) {
    int readed = Serial.read();

    Serial.println("READED BYTES: " + readed);
  }
}

michele-grifa avatar Nov 05 '22 15:11 michele-grifa

Both the web and serial SHOULD (known bug on serial, that RL hasn't afforded me time to solve) use the same processes to output. So, localhost:8080/getProdStats will help.

About to DM an Epic for charity. So, busy. Feel free to ping me in the modding discord.

porisius avatar Nov 05 '22 16:11 porisius

To let you know, I hadn't given up on this... I just haven't been successful, completely... seems to be a bug in ArduinoKit.

Heads up, I got to... this... which I am trying to figure out how/why...

image

porisius avatar Dec 09 '22 14:12 porisius

Don't worry, I will wait until a solution is found. If I can ask, after you found the solution, can you give me a little code example to read correctly from Arduino?

Thanks.

michele-grifa avatar Dec 09 '22 14:12 michele-grifa

Talking about an output sample for each function? If so, yeah, I've been meaning to document that those...

porisius avatar Dec 09 '22 14:12 porisius

Yes I mean that.

michele-grifa avatar Dec 09 '22 14:12 michele-grifa

Documentation is being worked on, but I think I finally got it working... my terminal program I was using to validate was only showing me the first 4K despite transferring over that, and thus forced me down an unnecessary rabbit hole.

Should be up for SMR soon once it completes virus scanning that is required by the mod community. FRM 0.8.10.

porisius avatar Dec 18 '22 16:12 porisius

I will try as soon as the documentation is updated.

michele-grifa avatar Dec 18 '22 19:12 michele-grifa

Documentation is updated and displayed on the site. Please do me a favor and make sure it makes sense to you. I added examples for all of them, a little bit of Arduino code, and a link to another Reddit/Github location. I might need to cull getAll a bit though, its a bit... big.

porisius avatar Dec 20 '22 17:12 porisius