HowTo build the Marlin 3D Printer Firmware on the Raspberry Pi

If you are already running the excellent octoprint as a printserver on a Raspberry Pi it is very convenient to also build Marlin on it. The new Raspberry Pi Zero W with onboard wifi is at only 10$ just perfect for both tasks. If you want to use the camera streaming of octoprint I would recommend a Pi3 though.

I made a script that sets up the necessary build environment and provides commands for building and uploading. It uses the official Arduino toolchain. Everything is standalone, nothing is installed outside the marlintool directory.

It works on the Raspberry Pi and Linux in general but not on OSX. The script auto detects the build platform architecture. At the moment Linux 32 Bit, 64 Bit and ARM are supported.

Several parameters at the beginning of the script allow to adapt it further to your needs. Recently Anet A6/A8 support has been merged back into the main Marlin branch. I would highly recommend to switch to the official Marlin branch from now on. You can find example configurations for Anet printers in the Marlin sources at: https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations/Anet. Just replace the “Configuration.h” and “Configuration_adv.h” in the marlin directory with the files your find there for a good starting point of your configuration.

If you do not need additional hardware/board definitions because you use the ones that come with the toolchain set the parameter “hardwareDefinitionRepo” to an empty string. This prevents the script from fetching the board definition that is needed for the A8 from github.

If you are running octopi on you Raspberry you need to disconnect it from your printer before uploading otherwise the serial port is blocked.

Code

here on github: https://github.com/mmone/marlintool

or download directly as a zip: https://github.com/mmone/marlintool/archive/master.zip

Commandline parameters

-s  — setup

Download and configure the toolchain and the necessary libraries for building Marlin. Also fetches the Anet board hardware definition from github if specified.

-m  — marlin

Download Marlin sources.

-f –fetch

Update an existing Marlin clone.

-v  — verify

Build without uploading.

-u  — upload

Build and upload Marlin. If you are running octopi on you Raspberry you need to disconnect it before uploading otherwise the serial port is blocked.

-b  –backupConfig  [name]

Backup the Marlin configuration to the named backup.

-r  –restoreConfig [name]

Restore the given configuration into the Marlin directory.

-c  — clean

Cleanup everything. Remove Marlin sources and Arduino toolchain.

-p  — port [port]

Set the serialport for uploading the firmware. Overrides the default set in the script.

-h  — help

Show help.

Photo based 3D Reconstruction on Portable Devices

Microsoft Research has released Information about a 3D Reconstruction App that runs on Windows Mobile. As far as the technology is concerned hardly anything new. It’s basically the same as Autodesks 123D Catch that is available on severall platforms with the actual image processing happening on the server.

The App looks very nice though, it comes with an acceleromteter supported visual guide that helps the user to capture all required images for a successfull 3D model construction.

3dscanui

Procedural Motion Graphics

Proceduralism is a video channel for procedural computer graphics on vimeo. Particle systems, procedural models, and visual effects achieved through custom scripts and software are showcased here, as are interesting visual results and examples of new ideas and technologies.

Some samples:

openSMILE – Speech and Music Interpretation by Large-space Extraction

openSMILE – Speech and Music Interpretation by Large-space Extraction.

The openSMILE feature extration tool enables you to extract large audio feature spaces in realtime. It combines features from Music Information Retrieval and Speech Processing. SMILE is an acronym for Speech & Music Interpretation by Large-space Extraction. It is written in C++ and is available as both a standalone commandline executable as well as a dynamic library. The main features of openSMILE are its capability of on-line incremental processing and its modularity. Feature extractor components can be freely interconnected to create new and custom features, all via a simple configuration file. New components can be added to openSMILE via an easy binary plugin interface and a comprehensive API.

Here’s the extensive feature list:

  • Cross-platform (Windows, Linux, Mac)
  • Fast and efficient incremental processing in real-time
  • High modularity and reusability of components
  • Plugin support
  • Multi-threading support for parallel feature extraction
  • Audio I/O:
    • WAVE file reader/writer
    • Sound recording and playback via PortAudio library.
    • Acoustic echo cancellation for full duplex recording/playback in an open-microphone setting (via the Speex codec library)
  • General audio signal processing:
    • Windowing Functions (Hamming, Hann, Gauss, Sine, …)
    • Fast-Fourier Transform
    • Pre-emphasis filter
    • Comb filter (available soon)
    • FIR/IIR filter (available soon)
    • Autocorrelation
    • Cepstrum
  • Extraction of speech-related features:
    • Signal energy
    • Loudness
    • Mel-/Bark-/Octave-spectra
    • MFCC
    • PLP-CC
    • Pitch
    • Voice quality
    • Formants
    • LPC
    • Line Spectral Pairs (LSP)
  • Music-related features:
    • Pitch classes (semitone spectrum)
    • CHROMA and CENS features
    • Weighted differential
  • Moving average smoothing of feature contours
  • Moving average mean subtraction and variance normalisation (e.g. for on-line cepstral mean subtraction)
  • On-line histogram equalisation (used for noise robust speech recognition)
  • Delta Regression coefficients of arbitrary order
  • Functionals:
    • Means, Extremes
    • Moments
    • Segments
    • Samples
    • Peaks
    • Linear and quadratic regression
    • Percentiles
    • Durations
    • Onsets
    • DCT coefficients
    • Zero-crossings
  • Popular feature file formats are supported:
    • Hidden Markov Toolkit (HTK) parameter files (read/write)
    • WEKA Arff files (currently only non-sparse) (read/write)
    • Comma separated value (CSV) text (read/write)
    • LibSVM feature file format (write)
  • Fully HTK compatible MFCC, PLP, energy, and delta regression coefficient computation
  • Fast: 27k features can be extracted with an RTF of 0.08