How to Communicate using SPI with the STM32 ARM MCU and a 400g Accelerometer - GPT-4o vs Claude @PatrickHoodDaniel
How to Communicate using SPI with the STM32 ARM MCU and a 400g Accelerometer - GPT-4o vs Claude  @PatrickHoodDaniel
Uploaded August 2024 | Updated November 2026, 9 hours ago
ARM Programming and Basic Circuit Building Vol 1 Book: amzn.to/3z324Sv

Get the NewbieHack Kits: newbiehack.com

My story: youtube.com/watch?v=38XBT1IhRfI
The video above will give you an in-depth understanding of who I am and how I tick!

The H3LIS331 400g Accelerometer: adafruit.com/product/4627

The following courtesy of Claude.ai:

In this video, I continue my series on using AI language models like ChatGPT and Claude to help program embedded systems. This time, I tackle a more challenging task: communicating with a high-G accelerometer using SPI on an STM32 microcontroller.
I start by explaining the unique aspects of high-G accelerometers and show how I connect one to my microcontroller. Then, I walk through my process of using AI to generate the necessary code, encountering various challenges along the way.
Throughout the video, I demonstrate my hands-on approach, from wiring the accelerometer to a breadboard, to creatively mounting it on a hammer for testing. I also share my experiences debugging and iterating on the AI-generated code.
The video culminates in a practical test where I use the hammer to generate impacts and measure the accelerometer's response. I analyze the results using STM Studio, showing real-time data across different axes.
For those interested in diving deeper into microcontroller programming, I recommend my book, which offers a comprehensive, beginner-friendly guide to getting started with these fascinating devices.
This project showcases the potential and current limitations of using AI in embedded systems programming, providing valuable insights for both beginners and experienced developers in the field.

0:00 Introduction and Project Overview
0:35 Discussing High-G Accelerometers
2:15 Connecting the Accelerometer to the Microcontroller
4:00 Using ChatGPT for Initial Programming Attempt
5:34 Modifying the Accelerometer for Testing
7:52 Debugging with ChatGPT (Unsuccessful Attempts)
8:58 Trying Claude AI from Scratch
9:52 Testing the Accelerometer with Claude's Code
12:25 Book Recommendation and Conclusion
How to Communicate using SPI with the STM32 ARM MCU and a 400g Accelerometer - GPT-4o vs Claude26. How to Interface an LCD to an ARM Microcontroller Tutorial - Part 13Introduction to the NewbieHack Patreon EffortLearn STM32 Microcontroller Programming - Full Course for EE/CS Students and Beginners Version 32. Install Mach3 and the pokeys57CNC Plug-in for Mach353. How to Remove LCD Artifacts after a Changing Number - ARM STM32 Microcontroller Tutorial56. Remove the LCD to simplify the Circuit and Setup STM Studio - ARM Microcontroller Tutorials55. How to Make Multiple Pin External Interrupts (2 pins) - ARM STM32 Microcontroller TutorialOLED Display Programming Command Registers STM32 (Contrast, Segment Remapping, and Inverse)#9 ARM STM32 Microcontroller Tutorial - Solder SMD Chips Like a BOSS!!How to use our Vacuum Pressure ControllerCreating an STM32 64 Pin Breakout Board in KiCad  - Live Design Session - Part 1
BuildYourCNC |

How to Communicate using SPI with the STM32 ARM MCU and a 400g Accelerometer - GPT-4o vs Claude

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER