Hi striker (desperate)

Hi all, I have a major problem. I need to add some code to the example from https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide#arduino-code

I need to be able to switch LED's on as you hit the strike pad, so the harder you hit it the more LED's light up.

I have absolutely no knowledge of how to program the Arduino and cannot find any code that I can paste into this existing code so any help much appreciated.

We are using an Arduino uno.

Yours desperately

Rob

into this existing code

The code that you failed to post?

So desperate that you'd risk a forum timeout for cross-posting? (don't fret - I deleted the duplicate for you)

Hi all, I have a major problem. I need to add some code to the example from https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide#arduino-code

I need to be able to switch LED's on as you hit the strike pad, so the harder you hit it the more LED's light up.

I have absolutely no knowledge of how to program the Arduino and cannot find any code that I can paste into this existing code so any help much appreciated.

We are using an Arduino uno.

Yours desperately

Rob

Rob, pasting code typically doesn't work.

Hi, thanks for the reply. We have tried posting bits of code that looked promising and attempted to modify them but no joy. The project is for my Apprentices and needs to be finished by tomorrow so would you or anyone be able to have a look and write a bit of code to get the LED’s to operate as well as the load cell outputs ?

Any help hugely appreciated

Rob

Try posting in "gigs and collaborations" and offer money.

ANOTHER cross-post?

Threads merged.

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

Here is the code if anyone could help

/* Example using the SparkFun HX711 breakout board with a scale By: Nathan Seidle SparkFun Electronics Date: November 19th, 2014 License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).

This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your specific load cell setup.

This example code uses bogde's excellent library: https://github.com/bogde/HX711 bogde's library is released under a GNU GENERAL PUBLIC LICENSE

The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge based load cell which should allow a user to measure everything from a few grams to tens of tons. Arduino pin 2 -> HX711 CLK 3 -> DAT 5V -> VCC GND -> GND

The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine.

*/

include "HX711.h"

define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch

define DOUT 3

define CLK 2

HX711 scale(DOUT, CLK);

void setup() { Serial.begin(9600); Serial.println("HX711 scale demo");

scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

Serial.println("Readings:"); }

void loop() { Serial.print("Reading: "); Serial.print(scale.get_units(), 1); //scale.get_units() returns a float Serial.print(" lbs"); //You can change this to kg but you'll need to refactor the calibration_factor Serial.println();}

You have posted code without using code tags. This creates certain problems and obstacles for other forum members. The code tags make the code look

like this

when posting source code files. It makes it easier to read, and can be copied with a single mouse click.
If you have already posted without using code tags, open your message and select “modify” from the pull down menu labelled, “More”, at the lower left corner of the message. Highlight your code by selecting it (it turns blue), and then click on the “</>” icon at the upper left hand corner. Click on the “Save” button. Code tags can also be inserted manually in the forum text using the [code] and [/code] metatags.

When you are finished that, please read these two posts:

How to use this forum - please read.
and
Read this before posting a programming question …