Code Monkey home page Code Monkey logo

bad-apple-tm4c123gxl-nokia-5110's Introduction

bad-apple-tm4c123gxl-nokia-5110

Ad hoc tools for playing the Bad Apple!! song's famous animation on the TM4C123GXL LaunchPad with the Nokia 5110 display.

Instructions

  1. Download the original animation video from https://www.youtube.com/watch?v=FtutLA63Cp8
  2. Install Python, then the requirements for the Python scripts using pip install -r requirements.txt (preferably in a virtual environment).
  3. Use the extract-frames.py script to extract frames from the video using a command like:
    python extract-frames.py --input bad-apple.mp4 --out frames-dir --frame-per-second 25
  4. Use the frames-to-bitmaps.py script to convert the frames to a format the Nokia 5110 display can understand, using a command like:
    python frames-to-bitmaps.py --input frames-dir --out bitmaps.bin
  5. Copy the resulting file to the bad-apple-ccs/Debug directory. The code assumes it will be named bitmaps.bin though you can change that in bad-apple-ccs/main.c.
  6. Hook up your Tiva C board and wire the Nokia 5110 LCD connections as described in the bad-apple-ccs/Nokia5110.h file. Additionally, wire up the backlight pin to the A4 pin on your board, or change it in the bad-apple-ccs/main.c file to your liking.
  7. If you don't have Code Composer Studio already installed, install it from here along with the TivaWare library from here.
  8. In Code Composer Studio, set up a path variable named TIVAWARE_ROOT pointing to the location of the TivaWare library on your system. CCS Linked Resources screen
  9. Open the bad-apple-ccs folder in Code Composer Studio and run the project in debug mode. Running it in debug mode is vital, as the code uses the C standard library's IO functions to send data to the card through USB. I originally intended to use a MicroSD card adapter to store the data, but couldn't get my adapter to work with the microcontroller.

Demo

Demo on Youtube: https://www.youtube.com/watch?v=Bx7Z_19iOPA

I extracted 25 frames per second from the video. The resulting video playback on the board was slow (taking about 12 minutes to finish), so I speeded it up by a factor of around 3.5 using ffmpeg:
ffmpeg -i in.mp4 -vf "setpts=(PTS-STARTPTS)/3.5" -crf 18 out.mp4

bad-apple-tm4c123gxl-nokia-5110's People

Contributors

abdnh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.