Arduino : Potentio Indicator Uses Led Matrix MAX7219
by MrSottong in Circuits > Apple
1818 Views, 5 Favorites, 0 Comments
Arduino : Potentio Indicator Uses Led Matrix MAX7219
![photo_2019-11-04_06-02-26.jpg](/proxy/?url=https://content.instructables.com/FXZ/39UX/K2J48EPA/FXZ39UXK2J48EPA.jpg&filename=photo_2019-11-04_06-02-26.jpg)
In the previous tutorial I've made a potentiometer indication using the RGB ring neo pixels led. you can see it in this article "Potentio Indicator Uses RGB Neopixel"
And today I will show the potentiator indicator using the MAX7219 led metric display.
Follow the steps below to make it.
Required Components
![image836.png](/proxy/?url=https://content.instructables.com/FSU/F160/K2J48ENH/FSUF160K2J48ENH.png&filename=image836.png)
![IMG_6882.JPG](/proxy/?url=https://content.instructables.com/FT4/BQZA/K2J48ENI/FT4BQZAK2J48ENI.jpg&filename=IMG_6882.JPG)
![IMG_6885.JPG](/proxy/?url=https://content.instructables.com/FV8/SFY3/K2J48ENL/FV8SFY3K2J48ENL.jpg&filename=IMG_6885.JPG)
![IMG_6886.JPG](/proxy/?url=https://content.instructables.com/F7C/FB87/K2J48ENO/F7CFB87K2J48ENO.jpg&filename=IMG_6886.JPG)
![IMG_6901.JPG](/proxy/?url=https://content.instructables.com/FY8/88E9/K2J48ENP/FY888E9K2J48ENP.jpg&filename=IMG_6901.JPG)
Required Components :
- Arduino nano
- Potentiometer
- Max7219 Led Matrix Display
- Jumper Wire
- Project Board
- USB mini
- laptop
Required Library
- LedControl
Scheme
![image2629.png](/proxy/?url=https://content.instructables.com/FPS/V1KR/K2J48EN0/FPSV1KRK2J48EN0.png&filename=image2629.png)
![bitmap.png](/proxy/?url=https://content.instructables.com/FVC/QQ2W/K2J48EN1/FVCQQ2WK2J48EN1.png&filename=bitmap.png)
![photo_2019-11-04_06-02-53.jpg](/proxy/?url=https://content.instructables.com/FBR/XNL2/K2J48EPC/FBRXNL2K2J48EPC.jpg&filename=photo_2019-11-04_06-02-53.jpg)
To assemble the components see the schematic drawing above, you can also see the information below:
Arduino to Led & potentio
+5V ==> VCC & 3.Potentio
GND ==> GND & 1.Potentio
D6 ==> DataIn
D7 ==> CLK
D8 ==> CS / Load
Programming
![Capture.PNG](/proxy/?url=https://content.instructables.com/FAR/5JWE/K2J48EN8/FAR5JWEK2J48EN8.png&filename=Capture.PNG)
Use the code below to make ait:
#include "LedControl.h"
/* Now we need a LedControl to work with. ***** These pin numbers will probably not work with your hardware ***** pin 6 is connected to the DataIn pin 7 is connected to the CLK pin 8 is connected to LOAD We have only a single MAX72XX. */
LedControl lc=LedControl(6,7,8,1);
unsigned long delaytime=100;
void setup() { lc.shutdown(0,false); lc.setIntensity(0,8); lc.clearDisplay(0); } void loop() { int val = analogRead(A0); val = map(val, 0, 1023, 0, 8);
if(val == 1) {
lc.setRow(0,0,B10000000); }
if(val == 2) { lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); } if(val == 3) {
lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); } if(val == 4) {
lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); lc.setRow(0,3,B10000000); } if(val == 5) {
lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); lc.setRow(0,3,B10000000); lc.setRow(0,4,B10000000); } if(val == 6) { lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); lc.setRow(0,3,B10000000); lc.setRow(0,4,B10000000); lc.setRow(0,5,B10000000); } if(val == 7) { lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); lc.setRow(0,3,B10000000); lc.setRow(0,4,B10000000); lc.setRow(0,5,B10000000); lc.setRow(0,6,B10000000); } if(val == 8) { lc.setRow(0,0,B10000000); lc.setRow(0,1,B10000000); lc.setRow(0,2,B10000000); lc.setRow(0,3,B10000000); lc.setRow(0,4,B10000000); lc.setRow(0,5,B10000000); lc.setRow(0,6,B10000000); lc.setRow(0,7,B10000000); } lc.clearDisplay(0); }
Downloads
​Result
![Led matrik potentio](/proxy/?url=https://content.instructables.com/FAY/M0N6/K2J48ERR/FAYM0N6K2J48ERR.jpg&filename=Led matrik potentio)
Once programmed, the results will look like this.
If the potentio is rotated to the right, the live LEDs will increasingly follow the number of turns.
If the pot is turned to the left, the live LED will be less and less following the rotation potency.