I am using an accelerometer sensor in Node MCU to get 300 samples per second and store it for a week. My code below fails after some minutes.
import serial ser =