In: Computer Science
I am trying to write a code in C for a circuit board reads in a temperature from a sensor on the circuit board and reads it onto a 7-segment LED display.
How exactly would you code a floating 2 or 3 digit reading onto the LED display? I am stuck on this part.
For displaying floating 2 or 3 digit you need to use 2 or 3 seven segment display respectively.And for the digit after which you want the decimal point to be added you need to connect the DP pin of 7 segment display to any of the input pins of arduino and add an instruction in the C code.For example if the DP pin is connected to PIN 2 of the arduino then in the void loop function of the C code,write the command
digitalWrite(2,HIGH);
in order to light the decimal point.
FOR REFERENCE YOU CAN REFER TO MY CODE WHICH I HAVE MADE FOR A SINGLE SEVEN SEGMENT DISPLAY.SIMILARLY YOU CAN WRITE IT FOR MORE THAN 1 SEVEN SEGMENTS.