Adafruit Library For Mac

Nov 01, 2017  16 Channel PWM Servo Shield Library by foogee on Wed Oct 04, 2017 8:15 pm I'm a novice at this so I might be overlooking something but I've a problem that's driving me mad. EAGLE Academy How To Library Basics: How to Install and Use Your Sparkfun and Adafruit Libraries in Autodesk EAGLE. Autodesk EAGLE ships with a ton of free libraries right out of the box, but for some, that might be a bit of a problem. May 27, 2016  DEPRECATED! Please use Adafruit Blinka instead (was: Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and AdafruitBBIO libraries.) - adafruit/AdafruitPythonGPIO.

Adafruit
ARDUINO COMPATIBLES/LEARN ARDUINOARDUINO COMPATIBLES/ADAFRUIT METRO
Arduino libraries are a convenient way to share code such as device drivers or commonly used utility functions. This guide details how to install libraries on your computer. For an excellent introduction to Arduino libraries and what you can do with them, see the Libraries page from Arduino Tips, Tricks and Techniques.

There are three general types of Arduino Libraries:

Standard Libraries

The Arduino IDE comes with a set of standard libraries for commonly used functionality. These libraries support all the examples included with the IDE. Standard library functionality includes basic communication functions and support for some of the most common types of hardware like servo motors and character LCD displays.

Standard Libraries are pre-installed in the 'Libraries' folder of the Arduino install. If you have multiple versions of the IDE installed, each version will have its own set of libraries. For the most part, it is not a good idea to change the Standard Libraries or install your libraries in the same folder.

Library Manager Libraries

The newer Arduino IDE has a Library Manager which facilitates installing third-party libraries submitted to Arduino for use. Adafruit has most of its libraries and drivers in the Library Manager for easy use.

User Installed Libraries

There are many other libraries with useful functionality and device drivers for all sorts of hardware. These drivers are available from places like Arduino Playground, Github and Google Code.

User installed libraries should be installed in your sketchbook libraries folder so they can be used with all versions of the IDE. This way, if a new version of the IDE is released, you don't have to re-install all your favorite libraries!

The Library Manager is a newer feature of the Arduino IDE. Many of the popular libraries, including most of Adafruit's, are in the Library Manager. If you are looking to work with other people's libraries, first check the Library Manager to see if the library is there first rather than downloading a copy into your local libraries folder.

To start, load the Arduino IDE. Then use the menus at the top to select Sketch -> Include Library -> Manage Libraries...

You will then get a list of all the great libraries you can install!

Most often you may use the Search features at the top to find a specific library.

Above, the user typed adafruit into the search bar. All modern Adafruit libraries begin with the word Adafruit.

You can scroll down the list to find the library you are looking for. Say we wanted the Circuit Playground library like shown below. You can click the Install button to have it available or is it is already installed, you can select the version you want (often the latest but sometimes an earlier library for compatibility).

Often (but not always), loading a library will bring the availability of additional examples. In the menu, go to Files -> Examples then select your library name (if present) and browse the additional examples. Loading the Adafruit CircuitPlayground library above also loaded 12 examples and 4 directories with additional examples.

The latest versions of the Arduino IDE will alert you on startup that newer versions of your installed libraries (and boards) are available, if you would like to upgrade. You can safely ignore these in a pinch but you'll want to get the latest libraries when you start a new project.

The Library Manager is the simplest and safest way to install libraries. If possible, that is the method you should use.

If the library you want to use is not available via the library manager, you can get the source code and place it into your machine's local library folder. The location of the folder is rather specific.

See the file hierarchy below:

It is important to install your libraries in the correct location. Otherwise the compiler will not be able to locate them when you try to compile and upload your sketches.

Incorrectly installed libraries can cause many problems with the IDE.

Locate your Sketchbook Folder and the Libraries Folder Inside

Your sketchbook folder is the folder where the Arduino IDE stores your sketches. This folder is automatically created by the IDE when you install it.
On Linux machines, the folder is named 'Sketchbook' and it is typically located in /home/
On Windows and Macintosh machines, the default name of the folder is 'Arduino' and is located in your Documents folder.

This is a common source of confusion on Windows and Mac machines, your sketchbook folder is not named 'sketchbook' it is named 'Arduino'!

User installed libraries should go in a folder named Libraries, located inside your sketchbook folder. This is where the IDE will look for user installed libraries.

On version 1.0.2 and later of the Arduino IDE, the 'Libraries' folder is created automatically. On earlier versions of the IDE, you may need to create it when you install your first library.

Open the Preferences Dialog

Click File -> Preferences in the IDE.

Find the Sketchbook Location

Usually a folder named Arduino in your Documents folder.
Once you know the location, navigate to this folder in Windows Explorer or mac Finder

Create a Libraries Folder

If there is no Libraries folder there, create one.
Right click in Windows Explorer and select New -> Folder.

Rename to Libraries

Right click on the New Folder and select Rename. Then type in Libraries.

Follow these steps to install a library in Windows.

Close the Arduino IDE

First make sure that all instances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open!

Download the Zip File

Make sure to select a released version of the library. Some library repositories are still in development, and may contain unreleased or untested code. The 'Releases' button takes you to the tested and released versions.

  1. Click the 'Releases' button on the Github repository page to find the released version of the library.
  2. Then download the zip file.

Open the Zip File

Open the Zip File and copy the library master folder.

Paste into your Libraries Folder

Open your sketchbook Libraries folder and paste the master folder you copied from the .Zip.

Give it a Legal Name

The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK!

Re-start the IDE

Restart the Arduino IDE and verify that the library appears in the File->Examples menu.
Load one of the library examples to test.

Verify that it Compiles

Click the check-mark icon in the upper left and verify that the example sketch compiles without errors.
Follow these steps to install a library in Mac OSX.

Close the Arduino IDE

First make sure that all instances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open!

Download the Zip File

Make sure to select a released version of the library. Some library repositories are still in development, and may contain unreleased or untested code. The 'Releases' button takes you to the tested and released versions.

  1. Click the 'Releases' button on the Github repository page to find the released version of the library.
  2. Then download the zip file.

Find it in the Downloads Folder

OSX will automatically open the zip file there.

Drag it to your Libraries Folder

Open your sketchbook Libraries folder and drag the master folder from Downloads into it.

Give it a Legal Name

The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK!

Re-start the IDE

Restart the Arduino IDE and verify that the library appears in the File->Examples menu.
Load one of the library examples to test.

Verify that it Compiles

Click the check-mark icon in the upper left and verify that the example sketch compiles without errors.
Follow these steps to install a library in Linux.

Close the Arduino IDE

First make sure that Adafruit Library For Macall Adafruit library for mac proinstances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open!

Download the Zip File

Make sure to select a released version of the library. Some library repositories are still in development, and may contain unreleased or untested code. The 'Releases' button takes you to the tested and released versions.

  1. Click the 'Releases' button on the Github repository page to find the released version of the library.
  2. Then download the zip file.

Save the Zip File

Save the zip file to a convenient location.

Open the Zip File

Open the Zip File and copy the library master folder.

Start the Extraction

Select 'Extract' from the menu and navigate to your Sketchbook/Libraries folder

Extract into your Libraries Folder

After navigating to the sketchbook/libraries folder, complete the extraction.

Give it a Legal Name

The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK!

Re-start the IDE

Restart the Arduino IDE and verify that the library appears in the File->Examples menu.
Load one of the library examples to test.

Verify that it Compiles

Click the check-mark icon in the upper left and verify that the example sketch compiles without errors.

'xxxx' does not name a type

This is the most common library related error message and it means that the compiler could not find the library. This can be due to:
  • Library is not Installed (see previous pages in this guide)
  • Wrong Folder Location
  • Wrong Folder Name
  • Wrong Library Name
  • Library Dependencies
  • Forgot to Shutdown the IDE
See below for solutions to these problems.

Wrong Folder Location

The IDE will only find standard libraries and librariesinstalled in the sketchbook Libraries folder.It will not be able to find libraries installed elsewhere.

The Library folder must be at the top level of the Librariesfolder. If you put it in a sub-folder,the IDE will not find it.

Note: Some third-party library repositories have different folder structures. You may need to re-arrange things to make sure that the library files are at the top level of the folder. WaveHC is one example of this. The actual library folder is a folder within the top-level repository folder.

Don't have a 'Sketchbook' folder

It is there. But on a Windows or Mac/OSX machine it may not be named 'Sketchbook'. See the page titled 'Where to Install your Libraries'.

Incomplete Library

You must download and install the entire library. Do not omit or alter the names of any filesinside the library folder.

Wrong Folder Name

The IDE will not load files with certain characters in thename. Unfortunately, it doesn’t like thedashes in the zip files names generated by Github. When you unzip the file, rename the folder sothat it does not contain any ‘illegal’ characters. Simply replacing each dash (‘-‘) with andunderscore (‘_’) usually works.

Wrong Library Name

The name specified in the #include of your sketch must matchexactly (including capitalization!) the class name in the library. If it does not match exactly, the IDE willnot be able to find it. The example sketches included with the library will have the correct spelling. Just cut and paste from there to avoid typos.

Multiple Versions

If you have multiple versions of a library, the IDE will tryto load all of them. This will result incompiler errors. It is not enough tosimply rename the library folder. It mustbe moved outside of the sketchbookLibraries folder so the IDE won’t try to load it.

Library Dependencies

Some Libraries are dependent on other libraries. For example, most of the Adafruit GraphicDisplay libraries are dependent on the Adafruit GFX Library. You must have the GFX library installed touse the dependent libraries.

“Core” Libraries

Some libraries cannot be used directly. The GFX library is a good example ofthis. It provides core graphics functionalityfor many Adafruit displays, but cannot be used without the specific driverlibrary for that display.

Forget to shutdown the IDE

The IDE only searches for libraries at startup. You must shut down ALL instances of the IDEand restart before it will recognize a newly installed library.

This guide was first published on Feb 16, 2013. It was lastupdated on Feb 16, 2013.

3D Printed Mini Retro Computers

Use Adafruit HalloWing to make a mini Mac with images with sounds. 3D print a mini Mac for the speaker and display! Play the classic chime sounds from various Mac OS versions. A desktop toy that evokes nostalgia or prank device for co-workers? You decide!

The HalloWing PCB press fits into the face plate without screws and snap fits into the case. Speaker is housed in a back door with a working hinge. Parts 3D print without any supports!

No soldering necessary! HalloWing is pre-assembled and speaker is wired so it's plug-n-play! 3D print the case and snap fit everything together for easy assembly.

Circuit Python Code

Adafruit's CircuitPython is great for making slide show galleries that playback audio and display images. Use the capacitive touch pads on the HalloWing for input commands. You can rapidly update your code without having to compile and there's plenty of libraries, examples and support. Store plenty of images and audio assets on the built-in 8Mb SPI flash storage.

Prerequisite Guides

If you're new to Adafruit Feather, CircuitPython or soldering, take a moment to walk through the following guides to get you started.

Electronics

This project uses the Adafruit HalloWing M0 Express and a mini oval speaker. The speaker has a molex pico connector so it's plug-in-play!

Adafruit HalloWing M0 Express

This is Hallowing..this is Hallowing... Hallowing! Hallowing! Are you the kind of person who doesn't...
IN STOCK

Mini Oval Speaker - 8 Ohm 1 Watt

Hear the good news! This wee speaker is a great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like...
IN STOCK

Author Notes:

My first computer was an Apple Mac Performa 6300. I remember attempting to fix a Macintosh 128k in middle school because I told my teacher I owned an Apple computer. I was not able to get it running.

Phil Torrone (Mr. Ladyada) comes up with the best project ideas!

a hallowing that just plays a sound and image of the mac it came from. the enclosure is a mac

Circuit Diagram

This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference. This diagrams was created using Fritzing software.

Adafruit Library for Fritzing

Adafruit Library For Mac Free

Use our Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab the individual parts. Files are hosted on our github repo linked below.

Powering

The Adafruit HalloWing M0 Express can be powered via USB or JST-PH using a 3.7v lipo battery. In this project, USB power is used. Optionally, a 500mAh battery can be used to make it portable – Also fits nicely inside the case. The lipo battery is rechargeable via the USB port on the Adafruit HalloWing M0 Express.

Circuit Python Code

The code for this project was developed using Adafruit's CircuitPython and documented in John Park's tiny museum project. Head on over there and follow the tutorial to setup CircuitPython on your HalloWing M0 Express.

Mu: Python IDE

Check out the Mu Python editor for writing CircuitPython code you can easily save and load to your Adafruit supported hardware. Use the built-in serial console for debugging and the plotter for visualizing data. Download the software and check out the learn guide for installation help.

Mac Media Assets

Once you have CircuitPython installed and setup on the HalloWing M0 Express, you can download the assets for this project. This includes bitmap images of the Mac OS boot screens and chime audio wav files. These are included in the download link in the 3D printing page.

Upload Media Assets

Download the .zip file, and then uncompress it. Drag the .bmp and .wav files onto your HalloWing – CIRCUITPY. They must be at the top level of your HalloWing, not inside a folder.

Make sure the code.py and adafruit_slideshow.mpy files have been copied over.

Creating Custom Assets

The tiny museum project also covers how to create custom images and audio assets. If you're interested in creating your own assets for this project, be sure to walk through this page.

The Mac OS chime sounds were recorded from this YouTube Video. It also has 'crash' sounds.

The Mac OS boot screens were found in this blog post that features several others.

Reboot and Play Chimes

The capacitive touch pads are used to advance to the next image or the previous image. The code looks for .bmp files to play -- when it finds one it then parses that filename and looks for a .wav file with the same name. For example, macos8.bmp would cause the code to look for a macos8.wav file to play.

3D Printed Parts

Parts are designed to be 3D printed with FDM based machines. STL files are oriented to print 'as is'. Parts are listed below with file name and description. Parts require tight tolerances that might need adjusting slice setting. Reference the suggested settings below.

Print-In-Place Hinge

The STL file named hallowmac-case-back features a back door panel with a print-in-place hinge – This allows the panel to swing open and shut closed. The door panel is designed to house the min oval speaker. Tolerances in the hinge are designed to print using FDM 3d printers.

Parametric 3D Object

3D print the hinge-tester.stl file before printing the hallowmac-case-back.stl. See how the tolerances are and adjust slice settings if necessary. The door hinge in this project inspired me to create a parametric model that can be used in future projects. Here's a short video demonstrating how to scale up the hinge mechanism using Fusion 360's user parameters.

Adafruit Library For Eagle

Simple Enclosure

The STL file named hallowmac-case does not feature the print-in-place door hinge. 3D print the file named hallowmac-back.stl for the back panel – This houses the mini overal speaker and snap fits into the back of the case. Optionally, a bottom panel cover (hallowmac-bottom.stl) snap fits into the bottom of the case – This could be useful for housing extra components or a lipo battery pack.

hallowmac-case-back.stl

Enclosure with print-in-place door hinge

hallowmac-case.stl

Enclosure with opening in the back. No hinge.

hallowmac-face.stl

Face plate for case and non-hinged case.

hinge-tester.stl

Test print sample of print-in-place hinge.

hallowmac-bottom.stl

Bottom panel for non-hinged case.

hallowmac-back.stl

Back panel for non-hinged case.

Slice Settings

Use these settings as reference. Values listed were used in Ultimaker's CURA 3.X slicing software.

  • 0.2mm Layer Height / 0.4mm nozzle
  • 0.38mm Line Width (inner & outer widths)
  • 40mm/s printing speed
  • 20% infill
  • Supports: No

Design Source Files

The enclosure assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, SAT and more. Electronic components like the board, displays, connectors and more can be downloaded from our Fusion 360 CAD parts github repo.

HalloWing 3D Model

Download the 3d model of the Adafruit HalloWing M0 Express and use it to create new cases, enclosures and props! The design features headers, connectors and the display for making accurate snap fit parts.

HalloWing Faceplate

The HalloWing PCB is secured to the 3d printed face plate without any machine screws. Four built-in standoffs elevate the PCB and two clips holds it down.

Adafruit Library For Eagle Download

Installation

Start by orienting the HalloWing PCB with the face plate. Position the PCB over the faceplate with the screen facing down. Insert the PCB into the clips by sliding it into place – PCB may need to be slightly angled. Press down on the PCB so the pegs in the standoffs go through the two mounting holes.

Connect Speaker

Grab the pico blade connector from the speaker and plug it into the port on the back of the HalloWing. The side with the two distinct tabs faces up with the PCB.

Install Face Plate to Enclosure

Place the speaker over the HalloWing PCB. Line up the faceplate with the case and lay it on top of the opening. Press the faceplate into the case so the lips are inserted. The two edges snap fit and 'click' into place.

Install Speaker

Open the back door of the case by pushing it outwards. The inside has a cavity designed to house the mini oval speaker. Place the speaker into the cavity and press down. Optionally, remove the protective backing by peeling it off – Sticky adhesive is lined on the outline.

Close Door

With the speaker secured to the door, close it back up by pressing down on the edge – The nub will engage the latch inside of the case. To reopen press the door open from the inside. Use both hands and fingers to carefully open and close the door, the latch might get damaged if the door is pressed all the way through.

Play Chimes

Touching the capacitive pads on the HalloWing PCB will play the chime and cycle through the different boot screens. Tap and hold to continuously play through all of the assets.

Adafruit Graphics Library Arduino

This guide was first published on Jan 30, 2019. It was lastupdated on Jan 30, 2019.