{"id":16133,"date":"2022-10-20T15:33:51","date_gmt":"2022-10-20T22:33:51","guid":{"rendered":"https:\/\/www.vernier.com\/til\/?p=16133"},"modified":"2024-07-17T15:33:01","modified_gmt":"2024-07-17T22:33:01","slug":"coding-with-vernier-sensors-and-python-troubleshooting-and-faqs","status":"publish","type":"post","link":"https:\/\/www.vernier.com\/til\/16133","title":{"rendered":"Coding with Vernier Sensors and Python &#8211; Troubleshooting and FAQs"},"content":{"rendered":"<p>Python is a popular and important programming language &#8211; useful as an introductory text-based language and yet powerful enough to have a wide range of applications. Vernier Science Education has developed several libraries that enable you to use our sensors &#8211; both LabQuest (wired) and Go Direct &#8211; with Python 3.<\/p>\n<p>To help you get started it is helpful to identify which type of sensor you intend to use.<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sensor family<\/strong><\/td>\n<td><strong>Development environment \/ Code Editor<\/strong><\/td>\n<td><strong>Computer \/ Chromebook<\/strong><\/td>\n<\/tr>\n<tr>\n<td>LabQuest (wired)<\/td>\n<td>User preference<\/td>\n<td>Mac or Windows computer<\/td>\n<\/tr>\n<tr>\n<td>Go Direct<\/td>\n<td>User preference<\/td>\n<td>Mac, Windows, or Linux<\/td>\n<\/tr>\n<tr>\n<td>Go Direct<\/td>\n<td>Web VPython<\/td>\n<td>Mac, Windows, Linux, or Chromebook with Chrome browser<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>A note about code editors. There are a large variety of code editors and integrated development environments (IDE) available. We have primarily used IDLE, which comes installed when you install Python from <a href=\"https:\/\/www.python.org\/\"><a href=\"https:\/\/www.python.org\/\">https:\/\/www.python.org\/<\/a><\/a> or Visual Studio Code, which is a free code editor available for Windows, Mac, and Linux operating systems.&nbsp;<\/p>\n<p>We have also collaborated with Bruce Sherwood to create a library allowing our Go Direct sensors to work in a web-based code editor called Web VPython (formerly known as Glowscript). There are some unique and powerful aspects related to using our Go Direct sensors with Web VPython. This program runs in a browser and does not require the installation of Python, which can be challenging. <\/p>\n<p>The main tools for getting started (including installation instructions, troubleshooting steps, and sample programs) are found here: <br \/><a href=\"https:\/\/vernierst.github.io\/godirect-examples\/python\/\">Go Direct sensors and Python<\/a><br \/><a href=\"https:\/\/github.com\/VernierST\/godirect-examples\/tree\/main\/web_vpython\" data-type=\"URL\" data-id=\"https:\/\/github.com\/VernierST\/godirect-examples\/tree\/main\/web_vpython\">Go Direct sensors and Web VPython<\/a> <br \/><a href=\"https:\/\/vernierst.github.io\/labquest-examples\/\">LabQuest sensors and Python<\/a><\/p>\n<p>The following help articles are arranged in the following categories:<\/p>\n<h3 class=\"wp-block-heading\">General<\/h3>\n<p><a href=\"\/til\/4307\/\">What coding environments can I use with Vernier sensors?<\/a><\/p>\n<h3 class=\"wp-block-heading\">Troubleshooting Python<\/h3>\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile\">\n<div class=\"wp-block-media-text__content\">\n<p>We encourage you to use the Issues menu in GitHub to look for answers to coding questions and troubleshooting, as well as the following sources:<\/p>\n<\/div>\n<figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"224\" height=\"31\" src=\"https:\/\/www.vernier.com\/til\/wp-content\/uploads\/sites\/2\/2022\/11\/image-3.png\" alt=\"\" class=\"wp-image-16384 size-full\" srcset=\"https:\/\/www.vernier.com\/til\/wp-content\/uploads\/sites\/2\/2022\/11\/image-3.png 224w, https:\/\/www.vernier.com\/til\/wp-content\/uploads\/sites\/2\/2022\/11\/image-3-220x31.png 220w\" sizes=\"auto, (max-width: 224px) 100vw, 224px\" \/><\/figure>\n<\/div>\n<p><a href=\"\/til\/14544\/\">Python is installed on my computer. Why isn't it discoverable?<\/a><br \/><a href=\"\/til\/14589\/\">No module named 'godirect' error message using Go Direct sensors with Python<\/a><br \/><a href=\"\/til\/4370\/\">What Bluetooth radio do I need for Go Direct Sensors and Python?<\/a><\/p>\n<h3 class=\"wp-block-heading\">Python on computers<\/h3>\n<p><a href=\"\/til\/16152\/\">Do I need to have the gdx folder co-located with my Python program?<\/a><br \/><a href=\"\/til\/12958\/\">Can I make a stand-alone app from my Python program?<\/a><\/p>\n<h3 class=\"wp-block-heading\">Python on Raspberry Pi and Linux<\/h3>\n<p><a href=\"\/til\/9843\/\">Can I use Vernier Go Direct sensors with Raspberry Pi?<\/a><br \/><a href=\"\/til\/10072\/\">Advanced Help connecting Go Direct sensors in Python on your Raspberry Pi<\/a><br \/><a href=\"\/til\/10594\/\">Why can't I connect my GoDirect sensor to my Python program via USB on my Linux operating system?<\/a><\/p>\n<h3 class=\"wp-block-heading\">VPython<\/h3>\n<p><a href=\"\/til\/16347\/\">Can I use VPython with Vernier sensors?<\/a><\/p>\n<h3 class=\"wp-block-heading\">Web VPython<\/h3>\n<p><a href=\"\/til\/16344\/\">How do I get started using Vernier sensors with Web VPython?<\/a><br \/><a href=\"\/til\/19229\/\">How do I use your Go Direct Respiration Belt with Python?<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Python is a popular and important programming language &#8211; useful as an introductory text-based language and yet powerful enough to have a wide range of&#8230;<\/p>\n","protected":false},"author":86433,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-16133","post","type-post","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/posts\/16133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/users\/86433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/comments?post=16133"}],"version-history":[{"count":0,"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/posts\/16133\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/media?parent=16133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/categories?post=16133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vernier.com\/til\/wp-json\/wp\/v2\/tags?post=16133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}