Hi everyone,
I am currently testing with the board RP2040 mikroBUS™ Development Board. (https://learn.sparkfun.com/tutorials/rp … -guide/all)
I followed the hook up guide and am able to compile with Arduino.
I use the board setting by github user earlephilhower and set the board to “SparkFun Thing Plus RP2040”.
My goal is to use click board so I have to get the UART0 work (I guess it is UART0?).
However, no matter how I call Serial1.write(what_ever_some_val), the TX pin is always 3.3V measured by oscilloscope.
I am doubt if I have any setting wrong?
Here is my code for testing:
#define ENOCEAN_SERIAL Serial1
#define TX_PIN 0
#define RX_PIN 1
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial) {
}
Serial.println("Serial init - done");
ENOCEAN_SERIAL.setTX(TX_PIN);
ENOCEAN_SERIAL.setRX(RX_PIN);
ENOCEAN_SERIAL.begin(57600);
led_init();
Serial.println("setup done");
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("loop - 3");
led_on();
delay(500);
led_off();
delay(500);
ENOCEAN_SERIAL.println(1);
}
////////// LED //////////
void led_init()
{
pinMode(25, OUTPUT);
}
void led_on()
{
digitalWrite(25, 0);
}
void led_off()
{
digitalWrite(25, 1);
}
Thank you in advance,
Lee