I need Help
coolkids2015
Posts: 6
So i started coding this project. What i want to confirm is will the program do what i think it will do. The whole point is to create a elevator, that can go to the floor you desire. In theory this should work, if i didnt mess up, but i want to make sure the program would work like its expected. So can anyone test the code, and maybe let me know thanks
Also i want to confirm this with servo motors. Lets say i say this
Also i want to confirm this with servo motors. Lets say i say this
DoorOpenClose: HIGH GreenLed LOW GreenLed PAUSE 1500 HIGH RedLed LOW RedLed PAUSE 500 RETURN GearTurn: PULSOUT 9, angle RETURN ReturnToSecondFloor: PULSOUT 9, 750 Return 'If pushbutton that is connected to pin 3 is pressed then do this.. ELSEIF (IN3 = 1) THEN ' Angle = 750 therefor do angle - 500 which will be 250 angle = angle - 500 'Will go to sub GearTurn which will make the gear in motor turn to 0 degrees which is set to 250 GOSUB GearTurn 'Doors will open and close once arrived on that floor GOSUB DoorOpenClose 'I dont know if this right but im guessing that the servo motor will return to 90 degrees which is set to 750 GOSUB ReturnToSecondFloor
Comments
Please use the code tags [ code ] [ /code ] (without the spaces inside the brackets) to post code .This preservers indentations and such.
At this point, what does it or not does it do?
So whats should happen is that it should act like a elevator. I use the second floor (which will be 90 degrees, as the starting point, every time the code is ran it should return to the second floor. I want to confirm that this code will work
[/code]
Press F7 in the Basic Stamp IDE. You need to correct the errors first.
IDK which code i sent you, the older one or newer, but heres the one with no errors.
[/code]
It's very hard to troubleshoot a scenario like this without a schematic and a photo of your setup. Is this something you could provide?
Ill send schemetic, and i cant send a pic of setup, i just need someone to test it, and tell me if it works, or if the coding is wrong with the servo motor, because im sorta lost about servo motors.
+I dont own a breadboard currently+
I mentioned above i dont have abreadboard here beside me, atm. Thats why i asked someone to look over the code, and spot any mistakes, or even test the code themself