Arduino 7-seg

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From Danish to

Threaded View
Har anskaffet et modul med 8 stk 7-segment displays (MAX7219).







Pos. 0 skrives 0
Pos. 1 skrives 6
Pos. 2 skrives 7
Pos. 3 skrives 8

Har C(++) en "integer position" funktion der kan bruges til at bestemme  
tallenes position, eller skal man den lange omvej af intToStr og  




Karl Erik.

Re: Arduino 7-seg
Den onsdag den 1. april 2015 kl. 13.34.56 UTC+2 skrev Karl Erik Christensen
:
Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it
  
Quoted text here. Click to load it

Quoted text here. Click to load it

 :-)
Quoted text here. Click to load it


est



trengen



ciffer0 = (tal/1)%10;
ciffer1 = (tal/10)%10;
ciffer2 = (tal/100)%10;
ciffer3 = (tal/1000)%10;

-Lasse

Re: Arduino 7-seg
Den 01-04-2015 kl. 21:12 skrev snipped-for-privacy@gmail.com:
Quoted text here. Click to load it






Karl Erik.


Re: Arduino 7-seg
Den 02-04-2015 kl. 00:47 skrev Karl Erik Christensen:




Karl Erik.


Re: Arduino 7-seg
Den 01-04-2015 kl. 13:34 skrev Karl Erik Christensen:
Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it

Quoted text here. Click to load it




void ExtractDecimalPart(float Value) {
   int IntegerPart = (int)(Value);
   int DecimalPart = 10000 * (Value - IntegerPart);
   Serial.print (IntegerPart);
   Serial.println (DecimalPart);
}

ExtractDecimalPart (1234.5678); //prints 5677

http://forum.arduino.cc/index.php?topic17%0633.0

Karl Erik.


Site Timeline