Week 11

This week I'm making the preswsure sensor and the stepper motor communicate with each other. When the pressure is detected the stepper motor will make a turn.

First I have to identify the readings from the pressure sensor (thry are from 1023 to 0) with 0 being the highest pressure.

Then I identified the angle that I wanted it to turn by determining the steps that I wanted it to make.

Then I wrote the code to connect the two together to turn the stepper motor.

Here's the code I wrote for it.

The pressure sensor and the stepper motor are communicating properly and are working, here's the link for the video for it.

  • (motor turning at the end of the video)