Yes, it should do.
OK, chapter 8.1.2 should be what you should be looking at.
Does the weight of 11110 pounds makes sense?
Yes, it should do.
OK, chapter 8.1.2 should be what you should be looking at.
Does the weight of 11110 pounds makes sense?
ok
L = pounds
G = gross
X = Setpoint 1 on display
O = Over/Under range
void setup() {
Serial.begin(9600, SERIAL_7O1);
}
char bufffer[15];
void loop() {
Serial.write(0x02);
Serial.println("'-897456'");
delay(1000);
uint32_t sensorValue = analogRead(A0) / 1.025;
sensorValue = sensorValue * 1000 + sensorValue;
Serial.write(0x02);
sprintf(bufffer, "' %6uLGX'", sensorValue);
Serial.println(bufffer);
delay(1000);
}
Yes, this is measuring the weight of large equipment we have - loads of gravel, commodities, etc
With an Uno, upload and debugging might be a bit tricky.
You will be better of using a board with a free UART; e.g. Mega, Leonardo etc. Once development is complete, you can move it to the final board that you want to use; it needs a small change.
I suggest that you study Serial Input Basics - updated. Example 3 can be used. The start marker will be 0x02 and the endmarker will be '\n'.
I can't help you with the display.
I will order a Mega and it should be here tomorrow along with the MAX232.
So I have my Mega and MAX232 - I have hooked in my led panel according to this.
Which PINS should the MAX232 connect to on the Mega board?
The attached library is working with my panel. However, it is 3 horizontal panels (each 16x32) - which would give a 16x96 panel. I think it is only written to display 16x32 and 32x32. Can we use existing codes to display that data from the serial updating each second?
#include <RGBmatrixPanel.h>
// Most of the signal pins are configurable, but the CLK pin has some
// special constraints. On 8-bit AVR boards it must be on PORTB...
// Pin 11 works on the Arduino Mega. On 32-bit SAMD boards it must be
// on the same PORT as the RGB data pins (D2-D7)...
// Pin 8 works on the Adafruit Metro M0 or Arduino Zero,
// Pin A4 works on the Adafruit Metro M4 (if using the Adafruit RGB
// Matrix Shield, cut trace between CLK pads and run a wire to A4).
//#define CLK 8 // USE THIS ON ADAFRUIT METRO M0, etc.
//#define CLK A4 // USE THIS ON METRO M4 (not M0)
#define CLK 11 // USE THIS ON ARDUINO MEGA
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
// Last parameter = 'true' enables double-buffering, for flicker-free,
// buttery smooth animation. Note that NOTHING WILL SHOW ON THE DISPLAY
// until the first call to swapBuffers(). This is normal.
RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true);
// Similar to F(), but for PROGMEM string pointers rather than literals
#define F2(progmem_ptr) (const __FlashStringHelper *)progmem_ptr
const char str[] PROGMEM = "Adafruit 16x32 RGB LED Matrix";
int16_t textX = matrix.width(),
textMin = (int16_t)sizeof(str) * -12,
hue = 0;
void setup() {
matrix.begin();
matrix.setTextWrap(false); // Allow text to run off right edge
matrix.setTextSize(2);
}
void loop() {
// Clear background
matrix.fillScreen(0);
// Draw big scrolly text on top
matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true));
matrix.setCursor(0, 1);
matrix.print(F2(str));
// Update display
matrix.swapBuffers(false);
delay(1000);
}
Okay, sorry for the delay. I have uploaded the most recent code to see what I have got. It looks "Adafruit..." word is static; however, it is showing receptively across the three panels instead of showing it as one using all screens. Where should I look to change this?
I think by the way it looks - it's impossible.
However, is there a way to get my data to display on just one or two screens?
DPM-P10 | Kala Engineering - Truck Scales, Load cells, Truck Scales Software. (kalascale.com)
This is what I would like to replicate. One color. Nothing fancy. Doesn't even need the units displayed. Just numbers.
As far as I know, the RGBmatrixPanel.h library doesn't support a multiple panels.
Use a new Adafruit_Protomatter
This can be done in many ways. For AVR Mega I recommended the library above. More options if you choose another board as STM32, Raspberry PIco RP2040 or ESP32.
What would be an ideal board to use? I am not opposed to spend some money as long as I can get it accomplished. Very open to suggestions.
very good for taking photo, post it.
so you have panels with some controller attached to a build in scale with that protocol,
and this controller you want to replace with custom board, and sketch in post#22 is completely opposite what you need. you said above you run test sketch and get some text on panels, so actually you have almost done project.
and here is sketch for you:
#include <RGBmatrixPanel.h>
// Most of the signal pins are configurable, but the CLK pin has some
// special constraints. On 8-bit AVR boards it must be on PORTB...
// Pin 11 works on the Arduino Mega. On 32-bit SAMD boards it must be
// on the same PORT as the RGB data pins (D2-D7)...
// Pin 8 works on the Adafruit Metro M0 or Arduino Zero,
// Pin A4 works on the Adafruit Metro M4 (if using the Adafruit RGB
// Matrix Shield, cut trace between CLK pads and run a wire to A4).
//#define CLK 8 // USE THIS ON ADAFRUIT METRO M0, etc.
//#define CLK A4 // USE THIS ON METRO M4 (not M0)
#define CLK 11 // USE THIS ON ARDUINO MEGA
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
// Last parameter = 'true' enables double-buffering, for flicker-free,
// buttery smooth animation. Note that NOTHING WILL SHOW ON THE DISPLAY
// until the first call to swapBuffers(). This is normal.
RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true);
#define hue 0
void setup() {
Serial.begin(9600, SERIAL_7O1);//
matrix.begin();
matrix.setTextWrap(false);
matrix.setTextSize(2);
matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true));
}
void loop() {
if (Serial.available() > 10) {
delay(10);
byte b = Serial.read();
if (b != 0x02)return;
b = Serial.read();
long Weight = Serial.parseInt();
char c;
for (byte i = 0; i < 3; i++) {
c = Serial.read();
if (c == 'O')Weight = 0;
if (c == 39)i = 3;
}
Serial.readStringUntil('\n');
// Clear background
matrix.fillScreen(0);
// Draw big scrolly text on top
matrix.setCursor(0, 1);
if (Weight)matrix.print(Weight);
// Update display
matrix.swapBuffers(false);
delay(100);
}
}