Hey Community,
Da Ich es gerade brauchte (Off: Bin einen LED-Cube am bauen (8x8x8) mit Arduino UNO),
Hier ein kleiner Charlieplexing Rechner:
Wer nicht weiß was Charlieplexing ist oder für was es gut ist, hier der Wiki-Link.
Nun zum Script:
Spoiler anzeigen
#NoTrayIcon
Global Const $sTitle = "Charlieplexing Rechner"
Global Const $sVersion = "1.0"
Global Const $sDate = "20.04.2012 21:14"
Global Const $sText = StringFormat("%s (%s - %s)", $sTitle, $sVersion, $sDate)
$hMainGui = GUICreate($sText, 402, 154, -1, -1, -1, 384)
GUICtrlCreateGroup($sText, 8, 8, 385, 137)
GUICtrlCreateLabel("I/O Pin Anzahl", 24, 32, 118, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$hMainIOCount = GUICtrlCreateInput("5", 24, 56, 49, 21, 8320)
GUICtrlCreateLabel("Teilnehmer ansprechbar (Einzeln / Simultan)", 24, 88, 358, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$hMainClientCount = GUICtrlCreateInput("20", 24, 112, 121, 21, 2176)
GUICtrlCreateLabel("Formel: n^2-n", 272, 24, 113, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
$hMainWikiLink = GUICtrlCreateLabel("http://en.wikipedia.org/wiki/Charlieplexing", 180, 48, 205, 17)
GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
GUICtrlSetColor(-1, 0x0000FF)
GUICtrlSetCursor(-1, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $hMainWikiLink
ShellExecute("http://en.wikipedia.org/wiki/Charlieplexing")
Case $hMainIOCount
$iClientCount = Int(GUICtrlRead($hMainIOCount))
$iClientCount = (($iClientCount ^ 2) - $iClientCount)
GUICtrlSetData($hMainClientCount, $iClientCount)
EndSwitch
WEnd
Ich hoffe evtl. kann es ja jemand gebrauchen
mfg, Blume