vichtel
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 🌱🐰☀️ Hallo👋, eigentlich geht es ja um die Socken, aber ich hörte dass du auch gerne bastelst. Im Paket ist daher noch eine Weiterbasteloption dabei; ein Blinkedings (das Ding in bubble wrap): - Blinkt - Anschluss wie ein Handy-Ladekabel (5V USB-Anschluss bzw Handyladegeräte) Es handelt sich um sehr niedrige Ströme (5V, <1A, also eigentlich zu niedrig für Funken oder sowas) generell natürlich die Empfehlung sowas nicht tagelang unbeaufsichtigt laufen zu lassen (Stromverbrauch). Das Programm ist ein leicht angepasstes Demo-Programm der Fastled-library (Details s.u.). Bin selbst absoluter Coding-Anfänger, ich mag einfach blinkende Lichter, daher nicht über die vielen Kommentare im Code wundern. Ich hoffe du hast Freude damit, zumindest mit hoffentlich passenden Socken, und ein sonniges Vostern! ## Bastelideen - **ohne coding** - in Butterbrot-Tüte, dünnes Papier oä einpacken um das Licht etwas zu dämpfen - zur LED-Matrix ausbauen, Anleitung zB im "GreatScott"-Kanal (braucht etwas Karton und eine matte Acrylglasscheibe oder z.B. Pergamentpapier): https://www.youtube.com/watch?v=D_QBlFIQk-o - nach [Tetrapix-Anleitung](https://tetrapix.de/nachmachen/) (mit Tetrapacks und Papier) - **inkl coding** - in der fastled library-Dokumentation herausfinden wie man einzelne Pixel ansteuert (hab ich schon wieder vergessen, aber geht) http://fastled.io/ - man kann zB [einen ESP32 anschließen](https://www.youtube.com/watch?v=_0a9JZLGu4M) und mit der Blynk-App oä die LEDs fernsteuern - von GreatScott gibt es auch eine schöne [Anleitung zu eigenen Animationen und Pixel art](https://www.youtube.com/watch?v=o6_UYb6I4x4) - weitere WS2811-Strips bestellen und das Ganze erweitern? # LED-Matrix Das Ding läuft mit einem Arduino, um das Dings auf ein anderes Pattern anders zu programmieren braucht man - ein Mini-USB-Kabel Typ B für den Arduino Nano, so wie [dieses hier](https://www.amazon.de/-/en/gp/product/B07PVWTRFX?pf_rd_r=NRF56V5Q25ZYYY31EEN7) - Einen Treiber, denn es ist kein echter Arduino sondern einer der CH340G-Nachbauten - [Mac-Treiber](https://kig.re/2014/12/31/how-to-use-arduino-nano-mini-pro-with-CH340G-on-mac-osx-yosemite.html - Windows und Linux-Treiber habe ich nicht selbst ausprobiert, [diese](https://www.makershop.de/ch340-341-usb-installieren/) sollten aber funktionieren - aktuelle Version der [Arduino IDE](https://www.arduino.cc/en/software) - die [https://github.com/FastLED/FastLED](https://) (lässt sich auch direkt aus dem Arduino-Programm herunterladen) - es empfiehlt sich, vorher erstmal ein paar Arduino-Basics auszuprobieren. Falls du das Demo-Programm ausprobierst, die LEDs sind über Data Pin 10 angeschlossen (das grüne Kabel) - das unten stehende Programm (im grauen Kasten) ## Code - Helligkeit anpassen mit dem Wert bei: ```#define BRIGHTNESS 200``` - weitere Anpassungen: Werte ändern bei - Fade_Speed - Variance_A - ggf andere Werte (ich habe nur den Fastled-Democode gefrankensteint) ```csharp= #include "FastLED.h" // FastLED library from // https://github.com/FastLED/FastLED FASTLED_USING_NAMESPACE // Based on FastLED "100-lines-of-code" demo reel from Mark Kriegsmann // https://github.com/FastLED/FastLED/tree/master/examples/DemoReel100 #if defined(FASTLED_VERSION) && (FASTLED_VERSION < 3001000) #warning "Requires FastLED 3.1 or later; check github for latest code." #endif // define data pins here #define DATA_PIN 10 // define number of LEDs #define NUM_LEDS 16 #define LED_TYPE WS2811 #define COLOR_ORDER GRB CRGB leds[NUM_LEDS]; #define BRIGHTNESS 200 // #define FRAMES_PER_SECOND int FRAMES_PER_SECOND = 7; // 1-255 = Geschwindigkeit wie die punkte erscheinen // confetti-effect int FADE_SPEED = 35; // 255: Punkte blinken nur kurz auf / 1 : punkte bleiben lange int VARIANCE_A = 25 ; // Varianz (0-255) - default: 64 // hier werden die Einstellungen gelesen, wenn der Arduino startet void setup() { delay(1000); // 3 second delay for recovery // tell FastLED about the LED strip configuration FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip); // set master brightness control FastLED.setBrightness(BRIGHTNESS); } // List of patterns to cycle through. Each is defined as a separate function below. typedef void (*SimplePatternList[])(); // define patterns here, e.g. (full list): // SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm }; SimplePatternList gPatterns = {confetti}; uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current uint8_t gHue = 0; // rotating "base color" used by many of the patterns // hier ist die main loop des Programms, dieser Code läuft immer wieder von vorne void loop() { // Call the current pattern function once, updating the 'leds' array gPatterns[gCurrentPatternNumber](); // send the 'leds' array out to the actual LED strip FastLED.show(); // insert a delay to keep the framerate modest FastLED.delay(1000/FRAMES_PER_SECOND); // do some periodic updates EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow // check if button pressed if (digitalRead(3) == LOW) { // if button pressed, switch pattern nextPattern(); } //EVERY_N_SECONDS( 10 ) { nextPattern(); } // change patterns periodically } #define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0])) void nextPattern() { // add one to the current pattern number, and wrap around at the end gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns); } // der Confetti-Effekt (das Blinken) wird hier definiert void confetti() { // random colored speckles that blink in and fade smoothly fadeToBlackBy( leds, NUM_LEDS, FADE_SPEED); int pos = random16(NUM_LEDS); leds[pos] += CHSV( gHue + random8(VARIANCE_A), 200, 255); // (Varianz), ?, ? } // weitere Effekte werden hier gesetzt // diese müssen aber in der SimplePatternList definiert sein void rainbow() { // FastLED's built-in rainbow generator fill_rainbow( leds, NUM_LEDS, gHue, 7); } void rainbowWithGlitter() { // built-in FastLED rainbow, plus some random sparkly glitter rainbow(); addGlitter(80); } void addGlitter( fract8 chanceOfGlitter) { if( random8() < chanceOfGlitter) { leds[ random16(NUM_LEDS) ] += CRGB::White; } } void sinelon() { // a colored dot sweeping back and forth, with fading trails fadeToBlackBy( leds, NUM_LEDS, 20); int pos = beatsin16(13,0,NUM_LEDS); leds[pos] += CHSV( gHue, 255, 192); } void bpm() { // colored stripes pulsing at a defined Beats-Per-Minute (BPM) uint8_t BeatsPerMinute = 62; CRGBPalette16 palette = PartyColors_p; uint8_t beat = beatsin8( BeatsPerMinute, 64, 255); for( int i = 0; i < NUM_LEDS; i++) { //9948 leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10)); } } void juggle() { // eight colored dots, weaving in and out of sync with each other fadeToBlackBy( leds, NUM_LEDS, 20); byte dothue = 0; for( int i = 0; i < 8; i++) { leds[beatsin16(i+7,0,NUM_LEDS)] |= CHSV(dothue, 200, 255); dothue += 32; } } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully