Thank you! Now I can see my debug message on SoftSerial.
TheOtherMatt
@TheOtherMatt
Best posts made by TheOtherMatt
-
RE: Correct Usage of MY_DEBUGDEVICE
Latest posts made by TheOtherMatt
-
RE: Correct Usage of MY_DEBUGDEVICE
@skywatch Ah, and you are right about the LED. I re-designed the circuitry a while ago to accommodate a RFM69 on the PCB back side, and meanwhile forgot the fact that my LED is now connected to Atmega328‘s port D3 now. For the serial function test it does not make a difference, however.
-
RE: Correct Usage of MY_DEBUGDEVICE
Yes, I had to state a radio definition too. I now see my soft serial prints as well as the debug transport layer messages to the (not yet connected) radio. All is as expected now. Now I can hook up the hardware serial to my periphery and build my node
-
RE: Correct Usage of MY_DEBUGDEVICE
Thank you! Now I can see my debug message on SoftSerial.
-
Correct Usage of MY_DEBUGDEVICE
Maybe I am missing the obvious, but I do not get along with the use of MY_DEBUGDEVICE.
My Arduino Sketch on a Pro Mini looks as follows:#define MY_DEBUG #define MY_DISABLED_SERIAL // I want to use the hardware serial myself #define MY_SPLASH_SCREEN_DISABLED // as per some forum post // #define MY_BAUD_RATE 75 // unclear to what device it refers, assuming HW serial // Setting up SoftwareSerial. // For Pro Mini (AtMega 328P) all pins are allowed // TX pin is onboard LED, so I should see it flicker on transmit. int Soft_TX = 3; // Port D3 int Soft_RX = 5; // Port D5, only needed for init #include <SoftwareSerial.h> SoftwareSerial mySerial(Soft_RX, Soft_TX); // Switch debug output for MySensors #define MY_DEBUGDEVICE mySerial; #include <MySensors.h> void setup() { } void loop() { mySerial.begin(75); mySerial.print("always visible"); #ifdef MY_DEBUG mySerial.print("only visible with DEBUG flag"); #endif }
Result: The onboard LED on Port D3 lights constantly.
If I connect a serial-to-USB converter and watch the output on a terminal, I see no text.If I remove all references to MySensors, i.e. only initialize SoftSerial, the LED is flickering as expected.
So far I conclude I am using the re-definition of MY_DISABLED_SERIAL and MY_DEBUGDEVICE incorrectly.