Hard Fault Error

I am creating a weather type station with a dht22 temp and humidity sensor, a SI1145 light sensor, 16x2 LCD screen and a microSD card attachment. I keep having an error come up at various times where the particle crashes and displays the SOS - 1 flash - SOS with the LED on top. I can’t seem to figure out what is causing this problem. Here is my > code

I have all appropriate pull-up resistors on the DHT22 and the SDA and SCL lines.
Any help for what causes this error would be much appreciated! Thanks!

I haven’t looked further, but in setup() you are calling lcdPrint() before you have actually initialised the lcd pointer.

1 Like