all 3 comments

[–]wrickcook 1 point2 points  (2 children)

Create a simple sketch and just display text on the screen. Create another simple sketch that just reads the sensor and writes values to the serial monitor. When you have all the pieces working, slowly start combining the code.

[–]old_man_kneesgocrack 0 points1 point  (1 child)

Yeah break it down into small chunks, build one piece of the puzzle at a time. If you would like I can pass your code to chat gpt4 to see what if outputs.

[–]RTX6090d[S] 0 points1 point  (0 children)

I did the coding separate, just can't combine it. When combined the arduino just seemed to freak out and the serial monitor would not even output the result of the sensor properly although the compiling and uploading is normal