Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Hello and in advance thank you for reading my post,
I am working on a project which is controlled by a stepper motor which also includes an encoder. I have made the motor running and now I want to proceed to the next step and include the functions of the encoder. I know that the encoder tells me the actual position travelled by the motor, however, as I am still quite a newbie, I have unfortunately no idea how to include the information of my encoder into my code (which library? which variables). Both motor and encoder are connected to my Arduino Uno and I have also attached a photo with the corresponding pins for the encoder.
Thank you for any much required help
Here's a huge list of resources and libraries, that should get you started: http://playground.arduino.cc/Main/RotaryEncoders
I'd recommend using this library as it automatically takes advantage of the interrupt capabilities, if you connect the encoder to the correct pins (2 & 3 on the Uno). You might need this in order to still get precise measurements even at high rpm.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I won the arduino uno r3 in an event, but I have doubts about how to take the first steps to learn how to program it. I would like to understand which courses I am looking for that work for my arduino model (uno r3) and which programming languages and which IDEs I can use. So I can look for a course in Udemy or another platform that I can learn without having to buy an arduino of another brand
The only language you really need to know to code an Arduino is C++. Even with just the basics, you can do quite a lot. These are some things I think are a must to know:
Variables
If Statments
Loops
Importing Classes
Calling Functions
Next you can download the Arduino IDE, and start coding. Look up tutorials on YouTube to get a hand of the different commands you have at your finger tips and how to compile and upload your code to the board. You'll be using different functions such as digitalWrite() which can be used to turn an LED connected to a certain pin on or off, and many more.
In short, learn C++, and look up YouTube tutorials and you should be good.
Although you won't need to take classes for the programming side, you may need to take some when creating circuits with the Arduino. Electronics can be hard to learn, and some people may need some resource other than YouTube to learn that.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to run my project using battery. I am using Adafruit Feather M0 Bluefruit LE. I want to know can I face any issue with battery temperature and how can I keep a trace on the battery temperature. If somebody knows how to solve this problem if I use Arduino boards please inform. I think same solution can work for Feather M0.
Any HELP would be appreciated!
Thanks in advance!
The ONLY solution is to use additional sensor to check the temperature of the battery. There is no other way. P.S. There are batteries which comes with implemented temperature sensor but most of them if not all are really pricey. I hope that help.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
How do i send data manually (without any pre-made library) to a ws2801 led strip with a arduino?
I'm not asking for someone to write the code for me, just a push in the right direction.
i have a arduino leonardo
You use SPI, which is 3 data lines from the Arduino.
Check out this tutorial:
Tronix SPI tutorial
and then the Arduino library/tutorial:
Arduino SPI Tutorial/Library
Now check the datasheet and see what you can learn from it:
WS2801 datasheet
There are several video tutorials online about using the Arduino, check them out once you grok SPI it's really quite simple.:
The WS2801, does use a SPI type interface similar to a Shift register, you push 3 Bytes of data to populate the first chip, then keep pushing more Bytes for an overflow.
The Data Sheet shows two wire, Clock & Data; but you can also connect POL (Output polarity reversal) up to a PWM output for intensity, thus the 3-wire interface.
Look at Adafruit-WS2801-Library for additional guidance.
This is several years later, but I'd been looking into the same subject, and found some relevant information that could help the next reader.
This project by Josh Levine uses 7 WS2812B strips to display scrolling text. The strips are connected in parallel to a single Arduino board, and the code for it does not use any pre-built library.
Check out the code here. The main thing is that the timing for WS2812b is very specific, and the code uses ASM to get the timing right. More reading about the WS2812 timing here.
Additional reading: If you're interested in how the LED strips connected in parallel work, Josh has also written up an article explaining his bit-crunching technique for this, which you can read here.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have the Arduino Mega,
i need more than the 40mA supplied by the pins to power up my dc-motors,
Is there a way to increase those 40mA to more like 100mA or so?
thanks
This isn't an SO question since it doesn't have anything to do with programming ... but anyway: You don't want to be driving a motor directly from an Arduino. Aside from the lack of adequate power, the motor will also generate spikes and electronic noise which will affect the Ardunio.
There are loads of tutorials on the web here's one. If you want to be able to reverse direction then you would use what is called an H-Bridge.
You can instead of connecting the dc motor with 1 pin to each terminal (+ve, -ve)
you can connect 2 or more (to add-up the current)
assuming a pin gives 40mA and you need 100mA, then you can connect each terminal from the dc-motor to 3 pins from the arduino providing 120mA
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Connecting a motor to move a laser pointer up/down left/right to draw patterns.
Has anyone seen any examples to help the project? What programming language would be used for this? What computer ports would this use? Does a custom circuit have to be made or does a store exist for this?
There is a lot of different approaches you could go to this. Here is a few off the top of my head.
1. You could use a micro controller like an Arduino.
2. You could use a serial port and a socket. Here would be a good resource if you want to pursue this route. http://www.easysw.com/~mike/serial/serial.html
3. If you only need to control two motors you could use the headphone jack on your computer. You could hook a simple amplifier circuit up to each of the left and right speaker line. Then hook each of the amplifiers up to a separate motor. Then you could write a program that generates a separate sound for each channel, thus modifying the voltage given to each motor.
P.S if you use a servo, you can control the exact angle of the laser.