Skip to main content

Project Based Engineering Instrumentation High Level Coding and Microcontrollers

Section 9.6 Method 5 - Logging Data to an SD Card

Another to log data is using a standalone micro sd card breakout board (See Chapter 11)[34]. Method 1 and 2 are simple to use but they require a laptop and Method 4 can only be done with a CPB. Method 3 is light-weight in the sense that you don’t need any extra components but this method can be somewhat unreliable. It’s possible to brick the CPX which requires formatting (See Chapter 7) or data corruption in general to the file. I’ve seen so many students not follow Method 3 correctly and either not get data or corrupt their entire CPX which requires them to reformat. Although some students have been successful, the complexity of getting boot.py to work properly requires great care and this is where Method 5 excels. In this method rather than logging data directly to the CPX/CPB and potentially corrupting the internal memory, the data is logged to an external SD card. After logging data the card can be removed and uploaded to a computer using any SD card to USB converter.