I currently have a project going on for school. I'm supposed to build a house with a door that is opened by a servo motor and gets the signal through the ultrasonic sensor. There should be a table in the house, the tabletop of which should rotate continuously. I am not able to write a program for it, can someone help me? My current program without the stepper motor:
int SPU = 2048;
Stepper Motor(SPU, 3,5,4,6);
int pos = 20;
const int trigPin = 9;
const int echoPin = 10 ;
const int led = 13;
duration = pulseIn(echoPin, HIGH);
distance = 0.034*(duration/2);
if (distance < 27)
The easier you make it to read and copy your code the more likely it is that you will get help
Please follow the advice given in the link below when posting code , use code tags and post the code here
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frustrating for you and frustrating for us.
The people who try to help with your pro…
If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags
@clsslc, your topic was moved to a more suitable location on the forum.
Van you please spend some time reading
How to get the best out of this forum, next edit your post and apply the code tags to your code as described in the link.
Vad kind of school gives You this kind of work before teaching programming?
September 23, 2021, 4:16pm
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.