element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
AMD
  • Products
  • Manufacturers
  • AMD
  • More
  • Cancel
AMD
Forum Importing Arduino library files into PYNQ?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
AMD requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 6 replies
  • Answers 1 answer
  • Subscribers 20 subscribers
  • Views 2148 views
  • Users 0 members are here
  • pynq
Related

Importing Arduino library files into PYNQ?

kevin_v
kevin_v over 4 years ago

Hello,

 

Does anyone here have experience with taking Arduino .h file type and was able to modify it to be used with pynq and juptyer? If so, could you include a modified file and the original file it was based off of, so i can take a look at both to understand what changes are needed to be made.

 

I know there is a document on the pynq website that explains how to make a header files but at least for me its not easy to follow. Here is the link to the document i am referring to:

https://pynq.readthedocs.io/en/latest/overlay_design_methodology/pynq_microblaze_subsystem.html?_ga=2.228378772.86472398…

 

Thanks

  • Sign in to reply
  • Cancel

Top Replies

  • Fred27
    Fred27 over 4 years ago +3
    What exactly are you trying to achieve? The primary function of C header files is to describe the signature of functions that are implemented elsewhere - either in a matching C source file or a compiled…
  • beacon_dave
    beacon_dave over 4 years ago +1 suggested
    Not sure if you have seen it or not but there is an example included with the PYNQ-Z1/Z2 build on using the Adafruit 1.8" LCD (Arduino) Shield on the PYNQ-Z1/Z2 and accessing it with Jupyter Notebooks…
  • phoenixcomm
    phoenixcomm over 4 years ago +1
    kevin_v Ok, let me show you the relationship between .h and .cpp or .c. First a file.h is a header file that only allows access to some (public) functions in file.cpp. Second, both of the processors in…
Parents
  • beacon_dave
    0 beacon_dave over 4 years ago

    Not sure if you have seen it or not but there is an example included with the PYNQ-Z1/Z2 build on using the Adafruit 1.8" LCD (Arduino) Shield on the PYNQ-Z1/Z2 and accessing it with Jupyter Notebooks.

     

    Arduino_LCD18 notebook:

    https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z1/base/notebooks/arduino/arduino_lcd18.ipynb

    source:

    https://github.com/Xilinx/PYNQ/tree/master/pynq/lib/arduino/arduino_lcd18/src

     

    Looks like it started off as a MS432 Launchpad project which Adafruit then adapted for use with Arduino, and which then Xilinx adapted it for use with PYNQ.

     

    However, perhaps you can compare the Adafruit Arduino code with the Xilinx PYNQ code to see what changes were made.

    Note that this PYNQ example appears to relate to the original v1 version of the Adafruit 1.8" LCD Shield and not the current v2 version. In the v2 version, Adafruit changed the analogue based output for the joystick switch to a digital I2C output using their 'seesaw' interface, and added three additional input buttons.

    There are a couple of additional Arduino shield examples in the PYNQ build for the Sparkfun 14180 'Ardumoto' and 9760 joystick shields:

    https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z1/base/notebooks/arduino/arduino_ardumoto.ipynb

    https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z1/base/notebooks/arduino/arduino_joystick.ipynb

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • kevin_v
    0 kevin_v over 4 years ago in reply to beacon_dave

    Thanks for pointing out that the code might have been based off of MS432. Awhile back i was trying to find the original library the lcd18 library was based on but with no luck. i will take a look at it and see if its what i am looking for.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • kevin_v
    0 kevin_v over 4 years ago in reply to beacon_dave

    Thanks for pointing out that the code might have been based off of MS432. Awhile back i was trying to find the original library the lcd18 library was based on but with no luck. i will take a look at it and see if its what i am looking for.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube