Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Playing With a Fan on an NanoPi M4V2

Featured Replies

I think this qualifies as a hardware hack? Certainly amuses me. Hopefully others enjoy it as well.

 

So never quite got my 3.5 mm audio jack working properly on my M4V2 (though others reportedly did). But did find a way to get audible tones from the PWM fan control by playing with the PWM period, so decided to see if I could get music out of my M4V2 in another way ...

 

What follows is interesting exploration of:

 

$ sudo install pip3
$ sudo pip3 install MIDIFile
$ sudo ./fanplay.py Bach.\ Johann\ Sebastian\ -\ Toccata\ And\ Fugue\ \(Bwv\ 565\)___WWW.MIDISFREE.COM.mid

 

This little diversion brought to you by:

  • Armbian
  • FriendlyElec
  • Python
  • A few spare hours on a weekend

 

Might try to play around with this a bit more at some point. Notably does not play Backstreet Boys (was asked to try). But does more or less work, at least on this one track.

 

Enjoy

fanplay.py

Guest
This topic is now closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.