Dear all,
I've been trying to generate a square wave using the tone() function on the Portenta using the Breakout Board. In particular, I am using GPIO pin 5, which only works if I use the alternative pin name of PG_3 as pointed out by @jerteach on Github back in March.
void setup() {
pinMode(PG_3, OUTPUT); //set pulse pin
pinMode(PG_10, OUTPUT); //reset pulse pin
}
void loop() {
tone(PG_3, 1000); //square wave generated on GPIO pin 5 with frequency 1 kHz; 50% duty cycle
}
The code compiles and uploads successfully, but all I get are four short red LED blinks followed by four long LED blinks. I take it that tone() is not supported by the Portenta?
All the best,
Ryan