Skip to content

How to read on the serial port of the arduino simulated program? #36

@Vincent14

Description

@Vincent14

Well.. my arduino sketch contains this code:

void setup() {
   Serial.begin(115200);
}

And my first try in Python looks like this:

from pysimavr.sim import ArduinoSim

print "Start"

arduino = ArduinoSim(mcu='atmega2560', external_elf='meuhcube.hex')

while True:
  arduino.get_serial()

But, this ends in an infinite loop without anything on the output and I can't Ctrl+C the terminal, I must close the window or my CPU just burns in place, any idea?

I don't know if I can ping you in every of my issues @Premik, you're so helpful, thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions