Skip to content

Commit

Permalink
clickLED entfernt
Browse files Browse the repository at this point in the history
  • Loading branch information
MKleinSB committed Sep 17, 2020
1 parent 82f85fe commit f5391e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
26 changes: 1 addition & 25 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Basierend auf der tollen Grundlagenseite
// http://robert-fromm.info/?post=elec_i2c_calliope
// (cc) Creative Commons Robert Fromm 2017
// setLED und Makecode / pxt-Paket (cc) 24.06.2020 M. Klein v1.2
// setLED und Makecode / pxt-Paket (cc) 17.09.2020 M. Klein v1.2

const enum State {
//% block="On"
Expand Down Expand Up @@ -166,30 +166,6 @@ namespace MCP23017 {

}

/**
* Klicke ein Feld an, um die LED anzuschalten
*/
//% block="ClickLED"
//% imageLiteral=1
//% imageLiteralColumns=12
//% imageLiteralRows=1
//% group="LEDs"
export function ClickLED(i: string): void {
// this is not pretty but basically, i is an Image
let im = <Image><any>i;
// im.showImage(0)
// im.showImage(5)
// im.showImage(10)
// im.scrollImage(1, 200)
for (let column = 0; column < 12; column++) {
if (im.pixel(column, 0)) {
setLed(column+1,State.High);
//basic.showNumber(column)
} else {
setLed(column+1,State.Low)
}
}
}

/**
* Schreibt in ein Register einen bestimmten Bitwert
Expand Down
1 change: 1 addition & 0 deletions pxt.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
],
"public": false,
"supportedTargets": [
"calliopemini",
"microbit"
],
"preferredEditor": "tsprj"
Expand Down

0 comments on commit f5391e1

Please sign in to comment.