Charlieplexing Rechner

  • 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
    [autoit]


    #NoTrayIcon

    [/autoit] [autoit][/autoit] [autoit]

    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)

    [/autoit] [autoit][/autoit] [autoit]

    $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)

    [/autoit] [autoit][/autoit] [autoit]

    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)

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]

    Ich hoffe evtl. kann es ja jemand gebrauchen :)

    mfg, Blume

  • 512 ?
    WTF ??
    Warum nimmst du nicht eine pro Cube und brichst das licht so dass es wie bei einem Autoscheinwerfer wirkt, eine helle Strahlkraft ...

    Es gibt sehr viele Leute, die glauben. Aber aus Aberglauben.
    - Blaise Pascal

    • Offizieller Beitrag

    Blume, was benutz du für 512 Led's für eine Schaltung?
    WIeviele Channels brauchst du zum adressieren, hast du dazu mal eine Schaltbild?

    Edit: Aus dem Stehgreif heraus würde ich 24 Channel brauchen.
    8 für die Längsreihe, 8 für die Querreihe und 8 für die Ebenen.

    Einmal editiert, zuletzt von Raupi (21. April 2012 um 10:46)