Hello Everyone, I am currently working on a school project where a projector-like screen is able to unroll and roll up automatically. I am not very experienced with Arduino since this is my first time using one. So any help on how to set up the program software and the electronic parts would be very helpful. I am planning of using a vex 2-wire motor 393 to control the rotation of the screen, which is attached to a pole.
I currently cannot upload my diagrams since I am a new user
How it will work:
Step 1: button is pressed, and the screen goes down and stops completely once it's fully unrolled.
Step 2: The button is pressed again, but this time, the screen goes up and stops until it's completely stored.
That is all.
All help is appreciated. Have a good day.
Hello @jmathew_superfan ,
To post images etc you need trust level 1, you can get there by:
Entering at least 5 topics
Reading at least 30 posts
Spend a total of 10 minutes reading posts
Users at trust level 1 can…
Use all core Discourse functions; all new user restrictions are removed
Send PMs
Upload images and attachments
Any idea how the controller will know where to stop?
The same question again.....
dougp
March 6, 2023, 11:52pm
5
Hopefully this tutorial will help you get the concept of a state machine. You'll need to decide on a good way to sense the top and bottom positions.
A common response to “I want my code to do A., then B., then C., etc.,” from the knowledgeable is “Use a state machine.” Many who are new to coding/programming have never heard of a state machine , although almost everyone is familiar with the concept. There are different ways to realize a state machine, like the very similar Sequential Function Chart , a construct used in Programmable Logic Controllers , but this discussion will deal only with the C++ switch/case construct - which is described bri…
xfpd
March 7, 2023, 5:51am
6
@jmathew_superfan
I like to help people break rules. You can post your diagram, before reaching level 1, in a code block by drawing it in ASCII.
Two sites for you:
Textik
ASCIIFlow
xfpd
March 8, 2023, 5:34pm
9
Okay... start gathering your information...
Are you using the Arduino Uno?
Here is your Vex motor driver (says two-wire, but I count one + vcc + gnd)
Your Vex 393 datasheet (good enough):
http://cmra.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/media_files/2_wire_393_motor_ig.pdf
http://cmra.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/media_files/IntegratedEncoderModule.pdf
Vex coding help pages:
The VEX Robotics Design System offers students an exciting platform for learning about areas rich with career opportunities spanning science, technology, engineering and math (STEM). These are just a few of the many fields students can explore by...
Here is the Vex library:
Vex example:
/* vexMotorLibraryExample.ino
Upload this program to your Arduino and open up the Serial Monitor
to manually control / specify the speed of your servo motor.
This example exercises all of the methods and properties that are
used in the vexMotor class. vexMotor uses the Servo library. You must
include both vexMotor.h and Servo.h.
Hardware connections:
=====================
To connect the standard 2-wire VEX motor 393 to an Arduino requires
a Motor Controller 29 module. Connect the wires on the Motor Controller
to the Arduino with the following pins:
MOTOR CONTROLLER 29 <--------> ARDUINO
=============================================
WHITE (signal) Digital pin 9
RED (power) VIN (Battery Power -- 5V works too, but won't be as strong or fast)
BLACK (ground) Ground (GND)
This file has been truncated. show original
And here, you can simulate an Arduino Uno commanding a "one wire" motor (signal, vcc, gnd):
Run IoT and embedded projects in your browser: ESP32, Arduino, Pi Pico, and more. No installation required!
Thank you so much! This will help me a lot with coding the vex motor. If I come across a problem, I will make a post.
And yes, I am using the Arduino Uno.
system
Closed
September 5, 2023, 8:49pm
12
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.