Netduino
4-digit shield class
0Ich habe alle mir bekannten Funktionen mit dem Shieldstudio 4-digit shield in einer Klasse zusammengefügt und paar Funktionen ergänzt.
Habe es als weiteres Projekt zu Suplanus hinzugefügt:
4-digit shield class
WriteSingleCharacter: Ein Zeichen an ein Digit schreiben.
WriteInverseCharacter: Ein Zeichen an ein Digit schreiben (invertiert).
WriteString: Eine Zeichenkette an alle Digits zeichnen.
CharEffect: Darstellung des/der Zeichen.
- MarqueeRight
- MarqueeLeft
- Blocks
SpecialCharacter: Sonderzeichen
- Fill
- Franc
- Yen
- Euro
- PlusMinus
- ArrowUp
- ArrowDown
- Empty
- Recangle
- Handsup
DoAnimation: Animation ausführen in unterschiedlichen Geschwindigkeiten.
- PongEasy
- PongHard
- Heart
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | using System.Threading; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; namespace Suplanus4digitShield { public class Program { const byte deviceAddress = 0x50; public static DigitShield ds = new DigitShield(deviceAddress, 400); public static OutputPort ledOnboard = new OutputPort(Pins.ONBOARD_LED, false); public static void Main() { while (true) { ledOnboard.Write(false); // Write single char ds.Clear(); ds.WriteSingleCharacter('T', MatrixUnit.A, CharEffect.ShortBlink); ds.WriteSingleCharacter('E', MatrixUnit.B, CharEffect.ShortBlink); ds.WriteSingleCharacter('S', MatrixUnit.C, CharEffect.ShortBlink); ds.WriteSingleCharacter('T', MatrixUnit.D, CharEffect.ShortBlink); Thread.Sleep(2000); // Custom Font ds.Clear(); ds.WriteCustomFont(BinaryCode.B0010000, BinaryCode.B0100100, BinaryCode.B0100000, BinaryCode.B0100100, BinaryCode.B0010000, MatrixUnit.A); ds.WriteCustomFont(BinaryCode.B1000000, BinaryCode.B0100100, BinaryCode.B0100000, BinaryCode.B0100100, BinaryCode.B1000000, MatrixUnit.D); Thread.Sleep(2000); // Animation: PongEasy ds.Clear(); ds.DoAnimation(AnimationTyp.PongEasy100); ds.DoAnimation(AnimationTyp.PongEasy50); ds.DoAnimation(AnimationTyp.PongEasy25); ds.DoAnimation(AnimationTyp.PongEasy10); ds.WriteString("LAME"); Thread.Sleep(2000); // Animation: PongHard ds.Clear(); ds.DoAnimation(AnimationTyp.PongHard100); ds.DoAnimation(AnimationTyp.PongHard50); ds.DoAnimation(AnimationTyp.PongHard25); ds.DoAnimation(AnimationTyp.PongHard10); // Write string ds.Clear(); ds.WriteString("www.Suplanus.de"); // Animation: Heart Thread.Sleep(2000); ds.Clear(); ds.DoAnimation(AnimationTyp.Heart); ledOnboard.Write(true); } } } } |
Netduino Helpers
0Netduino Helpers ist eine Open-Source Libary um verschiedene Sachen auf dem Netduino zu vereinfachen.
Diese Libary stellt verschiedene fertige Methoden und Treiber für Hardware zur Verfügung:
- Analog joysticks
- Interrupt-driven push-button
- Real-time clock (DS1307)
- 8*8 LED matrix
- AdaFruit SSD1306 OLED display
- AdaFruit ST7735 TFT display
- AdaFruit VC0706 Camera
- AdaFruit ST7565 Negative LCD display
- AdaFruit LPD8806 LED strip driver
- Sharp GP2Y0A21YK0F Distance Measuring Sensor
- Shift registers (74hc595)
- Runtime assembly & resource loader
- Bitmaps & Bitmap Compositions
- HiTec HS6635HB servo driver
- Serial Interface Builder
- Maxim 7219 / 7221 LED driver
- RTTL sound support
- Trigonometry library (exMath-based)
- Lightweight JSON parser (parsing from stream & string)
- Virtual Memory support
Die neuen Funktionen und aktuelle Version findet ihr hier.
4-digit shield
0Heute stelle ich euch mal Zubehör für den Netduino vor. Ein Shild ist sowas wie eine (Hardware-) Erweiterung für den Netduino und wird direkt aufgesteckt und funktioniert (meistens) out-of-the-box.
Das 4-digit shield beinhaltet 4 LED-Matrix Baugruppen mit jeweils 5×7 Pixel (LEDs).
Eigentlich ist dieses Schild primär dazu gedacht Text darzustellen. Hier hat Dennisdel schon eine schöne Klasse geschrieben.
Das ganze basiert auf dem Treiber-Chip MAX6953 from Maxim IC.
Kaufen könnt ihr es direkt beim Hersteller, Shieldstudio. Hier hat man auch nette und hilfsbereite Ansprechpartner. Preis sind inkl. Versand 47$ umgerechnet rund 33€. Den diesen Preis ist es sogar schwer es selbst zu löten.






:biggrin: