7 segment display and GSR sensor

so right now i have a program that uses a gsr sensor, takes a reading for 30 seconds and finds the average of the readings. how do i make this average display on a seven segement display for 10 seconds?

Which means that this one is solved, and you actually now have the value you need?

The exact details of how to right oops write to a 7-segment display depend on the display and the library used, but in principle... once you have the average, store the current time into a variable via millis() and display the value.

Then continually check the ever-increasing-millis() against the stored time, and when time's up, clear the display.

Best practice is always to get components working on their own before building in to the main program: have you got your display hooked up and in a test sketch able to display any value like 99 when you want to?

(I really hope, by the way, that GSR is "Galvanic Skin Response" not "GunShot Residue" :wink:

Provide a link to the datasheet for the display. If you cannot find one then you need to find out if you have a 'common anode' or 'common cathode' display.

Don't get a bare module, unless you really like to go hardcore and make life difficult on yourself. Get a display module with TM1367 or similar chip on board which takes care of the whole multiplexing for you. That, combined with existing libraries, makes displaying numbers on the display really easy.

wvmarle:
Don't get a bare module... Get a display module with TM1367 or similar chip

Totally agree: the sketch which I'm about to post in OP's other thread uses a bare module. That was false economy: one with a chip as mentioned is not much more expensive. And without such a chip, 2 digits needs 10x data lines...

Not just the data lines are the difference... the work for your MCU as well, and with it the huge impact on the rest of your sketch.

With a TM1367 you just write the number to the display in the form of a few bytes on a Serial interface and you're done. That IC will take care of all the hard work getting the digits to show.

With a bare module you have to constantly work on the display to get the correct number to display, and the main challenge is doing that without flicker as your Arduino is doing other things as well.

Yep to all of that, and I'm glad to say me nearest walk-in shop has stock, so I'm going to get one next time I'm in the area.