ObjectBlocks: Slider & meredup LED

From OnnoWiki
Revision as of 19:54, 19 March 2023 by Onnowpurbo (talk | contribs) (Created page with "center|500px|thumb #include <Wire.h> #include "TM1650.h" #include "Channel.h" TM1650 display; void setup() { // Pin Mode D...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Objectblocks-slider-led-meredup.png


  1. include <Wire.h>
  2. include "TM1650.h"
  3. include "Channel.h"

TM1650 display;


void setup() {

 // Pin Mode Definition
 pinMode(9, OUTPUT);
 Channel.connect("mFPdJAqtBzpu7t");
 Wire.begin();
 display.init();

}

void loop() {

 display.displayNumber((analogRead(A0)));
 Channel.sendNumber("SLIDER", analogRead(A0));
 delay(1000);
 analogWrite(9, round(analogRead(A0) / 4));

}