Drakkheen

Untitled

Mar 4th, 2021
588
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int zeile[] = {8, 7, 6, 5, 4};
  2. int spalte[] = {9, 10, 11, 12, 13};
  3.  
  4. byte A [] = {B01100, B10010, B11110, B10010, B10010};
  5. byte B [] = {B11100, B10010, B11110, B10010, B11100};
  6.  
  7. void setup() {
  8.  
  9.   for (int i = 4; i < 14; i++) {
  10.     pinMode(i, OUTPUT);
  11.   }
  12. }
  13. void loop() {
  14.  
  15. char myStr[] = "A";
  16. zeige(myStr[0]); // soll den ersten Buchstaben aus myStr[] in der Matrix anzeigen, zeigt aber wirre Punkte
  17.  
  18. // zeige(A); // funktioniert und zeigt A in der Matrix
  19.  
  20. }
  21.  
  22. void zeige(byte buffer2[]) {
  23.   for (int a = 0; a <= 4; a++) {
  24.     digitalWrite(zeile[a], 1);
  25.     for (int i = 0; i < 5; i++) {
  26.       digitalWrite(spalte[i], bitRead (buffer2[a], i));
  27.       digitalWrite(spalte[i], 0);
  28.     }
  29.     digitalWrite(zeile[a], 0);
  30.   }
  31. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×