diff --git a/docs/Assignments/week_4_programming/programming.md b/docs/Assignments/week_4_programming/programming.md index 6a636d3..d34de4c 100644 --- a/docs/Assignments/week_4_programming/programming.md +++ b/docs/Assignments/week_4_programming/programming.md @@ -703,7 +703,13 @@ Result: ![alt text](image-37.jpg) It compiles! -The next day when testing the code. The microcontroller would suddenly disconnect. First I tried setting every pin to something else because there where pins being defined the espC6 doesn't have. When I finally set the debug level to verbose. So I can see everything that the microcontroller is doing. I saw that it used pin 12 and 13 for USB. And somewhere in the program pin 12 and 13 where re-assigned. So I removed that it got reassigned and then the communication worked flawlessly again. +The next day when testing the code. The microcontroller would suddenly disconnect. First I tried setting every pin to something else because there where pins being defined the espC6 doesn't have. When I finally set the debug level to verbose. +I did that by adding this line in my platformio.ini file. [Source](https://community.platformio.org/t/how-to-set-up-log-level-to-be-able-to-debug-the-esp32/8278) +```ini +build_flags = -DCORE_DEBUG_LEVEL=5 +``` + +Now I can see everything that the microcontroller is doing. I saw that it used pin 12 and 13 for USB. And somewhere in the program pin 12 and 13 where re-assigned. So I removed that it got reassigned and then the communication worked flawlessly again. ![alt text](image-38.jpg) @@ -724,6 +730,7 @@ So I had the 3v3 connected to the sensor it's ground and the ground connected to * [PlatformIO espC6](https://wiki.seeedstudio.com/xiao_esp32c6_with_platform_io) * [ESC calibration and PWM](https://ardupilot.org/copter/docs/esc-calibration.html) * [ESP32PWMServo lib](https://randomnerdtutorials.com/esp32-servo-motor-web-server-arduino-ide/) +* [PlatformIO Debug level change for ESP](https://community.platformio.org/t/how-to-set-up-log-level-to-be-able-to-debug-the-esp32/8278) ### Parts * [PotSlider](https://nl.aliexpress.com/item/1005006733220962.html)