I need documentation for a public library

I am looking into the documentation of the Nintendo Wii nunchuck library that I am currently using. The Platform.ini is below.

    platform = atmelavr
    board = megaatmega2560
    framework = arduino
    monitor_speed = 115200
    lib_deps =
        Nintendo Extension 
        #clplaneguy/MakeblockPID  #Error: No permition
        debug_tool = jlink

I would guess that it is

Nintendo Extension Ctrl by David Madison
Library for talking to Nintendo extension controllers over I2C.

But this library uses

platform = atmelavr
framework = arduino

lib_deps =
     # Using library Id

     # Using library Name
     Nintendo Extension Ctrl

     # Depend on specific version
     Nintendo Extension Ctrl@0.7.2

     # Semantic Versioning Rules
     Nintendo Extension Ctrl@^0.7.2
     Nintendo Extension Ctrl@~0.7.2
     Nintendo Extension Ctrl@>=0.7.2

I have

#include <NintendoExtensionCtrl.h>

But, I can not find

lib_deps = Nintendo Extension

for any library.

I would not have just typed in this text. It was copied from somewhere.

Can you help me recreate what I have already done?

Well that must be a mistake because the only PIO registered library containing Nintendo Extension is called Nintendo Extension Ctrl as you have already found it. It is this library that provides the NintendoExtensionCtrl.h.

1 Like

Search finds that . .

platform = atmelavr
framework = arduino
lib_deps =
 <small># Using library <kbd>Id</kbd></small>
 <small># Using library <kbd>Name</kbd></small>
 Nintendo Extension Ctrl
 <small># Depend on specific <kbd>version</kbd></small>
 Nintendo Extension Ctrl@0.7.2
 <small># [Semantic Versioning Rules](https://docs.platformio.org/page/userguide/lib/cmd_install.html#description)</small>
 Nintendo Extension Ctrl@^0.7.2
 Nintendo Extension Ctrl@~0.7.2
 Nintendo Extension Ctrl@&gt;=0.7.2

But my program runs the way it is. This means an undocumented name is calling the library.

Is that possible?

Could PlatformIO be looking for

Nintendo Extension*

No, it just means at some point you correctly installed the Nintendo Extension Ctrl library into your projects .piolibdeps folder by using the right name. It’s not using a wildcard match to look for the library…


btw, those are the different ways to specify the library dependency… you don’t use all of them… pick one… ID, name, or specify the specific version or version range as needed. i.e. the ID means if there are two libraries with the same name, there is no guessing which is the correct one. Whereas specifying a specific version is more for projection projects where you want to ensure nothing changes.

I can see from the Terminal output that the correct library is used.

Scanning dependencies...
Dependency Graph
|-- <MakeBlockDrive> 3.26 #b7b9738
|   |-- <Wire> 1.0
|-- <PID2> #dd51ba7
|-- <SoftwareSerial> 1.0
|-- <Nintendo Extension Ctrl> 0.7.2
|   |-- <Wire> 1.0
|-- <Wire> 1.0
Checking size .pioenvs\megaatmega2560\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage

I has just curious about the text of the include and wanted conformation of the correct library.

I do not need to implement all of the examples.

1 Like