A Beginner’s Guide to Pmod App Notes

As many ofyou may have heard, we have some new applications notes for using Pmods with Arduino Uno. These projects have recently been made available on the newDigilent Projects网站您可以在其中下载项目代码并查看随附的Fritzing图像(适用)。

为了庆祝这些新的文件,我们创建了这个PMOD App Notes的初学者指南to help those of you unfamiliar with Arduino get started on your first Pmod and Arduino Uno project. While covering the many resources that may come to help in your creative pursuit, we will also review thePMOD NAV项目作为整个本指南的深入示例。


Getting Started with Pmod App Notes

You can begin your Pmod and Arduino Uno project by visiting the newDigilent Projectswebsite to browse from 40+ Pmods with supporting project code (many of which also include Fritzing images) and other Digilent related projects. Each project will open with a short description where you can learn about the project outcomes, the difficulty level, and project needs (i.e. the “things” you will be using). Below the list of project components you can find the Arduino code and sometimes a Fritzing image to make connecting your project parts even easier! Don’t worry if your project does not include a Fritzing image, like the Pmod NAV project we’re about to review, as they will have written instructions for the pins you need to connect at the beginning of the provided Arduino code.


设置您的Arduino Uno

For those of you as new to Arduino as I was, you will first need to download and install theArduino IDE。This installation link can be found on each Pmod project under “Software apps and online services” but can similarly be found in the Getting Started with Arduino resource provided这里

After downloading the Arduino IDE you may also need to下载其他库在您的PMOD项目的Arduino代码中引用。PMOD NAV项目提供的代码列出了“材料”下的所需库,并链接到适当的GitHub下载。单击代码描述中提供的GITHUB链接后,您将需要在绿色“克隆或下载”按钮下的下拉菜单中选择“下载zip”。下载后,必须通过在文件夹名称末尾删除“主”文本来重命名此文件(即此项目库的文件夹,应命名为“ SparkFun_LSM9DS1_ARDUINO_LIBRARY”),然后将文件夹移至您的Arduino下载文件夹(E.G. Documents> Arduinoino> arduinoino> arduinoino>库)。


返回你PMOD NAV项目, scroll down to the provided Arduino code and click “Copy the code” at the top righthand corner beside the project code title. Proceed by opening a new Arduino sketch, deleting all automatically loaded code, and pasting the code you copied from yourPMOD NAV项目。检查以确保所有内容在左上角单击“验证”(例如√图标),并确认屏幕底部没有报告错误。如果您收到任何错误,可以通过访问我们专门的技术支持社区来找到帮助解决方案Digilent Forum并在下面发布Add-on Boards。收到“完成的编译”消息后,您就可以将PMOD NAV和Arduino Uno连接起来!


连接您的PMOD NAV

As our Pmod NAV project does not come with a supporting Fritzing image, you will want to read through the Arduino code description to figure out which pins to connect. In the above image you can find this information under “Wiring” where Pmod NAV pins 6, 5, 4, and 2 are given under the word “Module” and their subsequent Arduino locations are written under “Arduino”. If you have trouble figuring out which pins are located where on your Pmod NAV, try visiting theDigilent Wiki您可以在屏幕的右侧找到每个PMOD的PINOUT(S)(请参见下图)。


在连接PMOD时,您可能还需要电缆(项目硬件组件中未列出),例如6针MTE电缆6-pin Header & Gender Changer, or thePmod Cable Kit: 12-pin。连接我的PMOD NAV和Arduino Uno时,建议使用6针MTE电缆,实际上使我的项目接线更加容易。将此电缆插入PMOD NAV PINOUT的顶行(此项目仅使用引脚2-6)使我能够快速区分并找到重要的销钉(例如地面和电源)(比我使用标准的12针电缆时要容易得多)。在下面可以看到随后的您的连接。


Starting your Sketch (and Getting Results!)

Now that you have your code setup and your Pmod NAV connected to your Arduino Uno you can connect your Arduino to your computer’s USB port. After choosing the correct port (e.g. Tools>Port>”/dev/cu.usbmodem…”) you can click “Upload” (i.e. the arrow at the top left of your Arduino script page) and wait for the “Done compiling” message at the bottom of your screen. At this point your Pmod NAV and Arduino Uno should be ready to go with results found when running the Serial Monitor (on Macs you can use the shortcut Shift+Command+M, or find this under the “Tools” dropdown menu) which should show constantly changing output similar to the image below.


您可以使用的另一个结果输出是串行绘图仪(使用快捷式偏移+命令+L),该绘图仪在您移动时绘制了PMOD NAV的位置。在连接到您的Arduino Uno时,您可以尝试拾取PMOD NAV并观察图形更新,因为您通过旋转,摇摆或颠倒将PMOD的位置更改PMOD的位置。该输出的一个示例可以在下面的图像中找到,用于各种PMOD NAV运动的不同峰。


分享您的创作!

Hopefully by now you have all of the resources you might need to get your Pmods up and running with Arduino Uno. Whether you’re a beginner (like me), or an experienced electronics enthusiast, we hope that this guide will help you create or teach others how to easily use Pmods in microcontroller projects.

让我们知道您打算在下面的评论中制作什么或分享您在新的项目中完成的项目Digilent Projects网站。请继续关注将来的更新,因为我们继续将更多的PMOD应用笔记项目添加到不断增长的Digilent Projects页面上!

0

关于奎因·沙利文

I am an apparel merchandiser who found comfort in the world of electronics after discovering a passion for making projects with copious amounts of glitter. Every day I work on learning and uncovering novel solutions that guide me towards solving life’s little problems. My optimism and two rescue puppies have kept me sane throughout this endeavor as I figure out how to blend two diverse backgrounds in fashioning something amazing that will eventually lead to world domination.

View all posts by Quinn Sullivan →

发表评论

您的电子邮件地址不会被公开。