Arduino Portenta Machine Control using sketch

Hi there,

I was thinking about getting a Portenta Machine Control and was wondering how transferrable my normal sketch code would be? Do I have to use an IEC 61131-3 language or can I use sketch on its own to begin with? Is the pin access the same for reading and writing?

Thanks again
Keith

Hi @hevery10, yes you can modify existing Arduino sketches to work with the PMC.

As far as reading and writing the process should be familiar to you:

// Read DI0
digital_inputs.read(DIN_READ_CH_PIN_00);
// Write DO0
digital_outputs.set(0, LOW);