SillyOldDuffer | 25/11/2020 18:31:25 |
10668 forum posts 2415 photos | Just a cotton-picking minute! Just noticed the board shown in Peter's picture is an 7-segment LED type and the Parola library is for 16x16 dot matrix display. They both use the MAX72xx and SPI, but otherwise aren't compatible Instead try a MAX7219 library for segment displays, best downloaded and installed from the Arduino's Library Manager. Several choices but max7219 by Jonathan Evans looks easiest. Dave |
Ady1 | 27/11/2020 16:08:28 |
![]() 6137 forum posts 893 photos | Got it in today, this works ok #include <MD_Parola.h> HX711_ADC LoadCell(4, 5); // parameters: dt pin, sck pin #define HARDWARE_TYPE MD_MAX72XX::FC16_HW const int Reset = 3; String J; void setup() { LoadCell.begin(); } void loop() {
if ((digitalRead(Reset) == LOW)) { LoadCell.tare(); }}
|
Ady1 | 27/11/2020 16:12:35 |
![]() 6137 forum posts 893 photos | I sent the 5v live and ground to the breadboard and connected the modules from there, the 7219 first The 7219 is greedy because it's 100s of LEDs Does negatives too edit: must confess that the outputs look weird to me, 100.5 is 10.05 kgs perhaps... hmmm Just noticed sods post... oops well if you get the led one it works ok... ish my brain has exploded so I'll look at calibration testing later Edited By Ady1 on 27/11/2020 16:32:31 |
Peter Bell | 28/11/2020 09:18:36 |
399 forum posts 167 photos | May thanks for all the help and suggestions. Tried them without success, however after reading the other thread on Arduino displays and following the suggestion from SOD I felt inspired enough to start looking up what I had on the 7219 which gave limited success due to my lack of knowledge before being abandoned 2 years ago. This time around from what I have learned I managed to work out what I was doing wrong and ended up with a working 7219 display on my weighing scale. This is my code below. The Adafruit display worked immediatly and its nice and large and bright so good suggestion. Next challenge is to explore storing and then retrieving a float value, can anyone reccomend an easy way or good tutorial etc? I keep hearing about wearing out eproms, is it best to store things like that on an SD card? Peter #include <HX711_ADC.h> void setup() { Serial.begin(9600); HCMAX7219.print7Seg(i,1,4,4); /* Write some text to the output buffer */ |
SillyOldDuffer | 28/11/2020 10:17:13 |
10668 forum posts 2415 photos | Posted by Ady1 on 27/11/2020 16:12:35:
I sent the 5v live and ground to the breadboard and connected the modules from there, the 7219 first The 7219 is greedy because it's 100s of LEDs Does negatives too edit: must confess that the outputs look weird to me, 100.5 is 10.05 kgs perhaps... hmmm Just noticed sods post... oops well if you get the led one it works ok... ish my brain has exploded so I'll look at calibration testing later
Can you post a picture of your working Parola Display Ady? Then we can see the difference between Peter's 7 segment display and a 16x16 display. What confused all of us is both types of display are driven by the same MAX7219 chip. It didn't work because the LEDs are wired differently to the 7219 so the commands sent to create visible characters on the two displays are incompatible. Peter's Adafruit display uses the #include <HCMAX7219.h> library, while Ady's display uses #include <MD_Parola.h> (which behind the scenes depends on the MD_MAX72XX library, supporting 7219 and 7222 LED drivers. ) Peter bumped into the need to check everything!
All the bother was caused by a simple mistook at the beginning : Peter's chosen library didn't match the hardware. Ady's mention of the 16x16 display guzzling power reminded me of another problem, fortunately it didn't happen here. There's a chance the bootloader will malfunction whilst burning a new program if the Arduino's power supply is heavily loaded by connected devices, The cure is to connect power greedy devices after loading the new program, or to power them separately. Dave
|
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.