Tech Tip: Arduino Support in Vizard

March 22, 2021

Jeff Loomis & Sado Rabaudi

Arduino uses its own language which is similar to C++. Instead, Python can be used and the easiest way to do that is having the board and Python communicate with the Firmata protocol. pyfirmata installs directly in the package manager. There's a lot of information on working with Arduino in this article: https://realpython.com/arduino-python/  

Use the following steps to use Arduino with Vizard:

  1. Install Arduino IDE 
  2. Upload the Firmata sketch to the arduino board (File- Examples-  Firmata -StandardFirmata). See the section called Uploading the Firmata Sketch  
  3. The sketch will be loaded into a new IDE window. To upload it to the Arduino:
  • Plug the USB cable into the PC.
  • Select the appropriate board (Tools- Board. For Arduino Uno, you should select Arduino/Genuino Uno)
  • Select port (under Tools- Port) 
  • Press Upload  

  1. Next, make sure that pyFirmata is installed from the package manager by going to Vizard and choosing Tools- Package Manager- Search and then searching “pyfirmata”
  1. After that you should be able to run pyfirmata/python code in Vizard to communicate with the device. There's examples in the realpython article for communication over both digital and analog pins.


Vizard Sample Code: 

For more information on how you can connect Vizard to additional python libraries see the Vizard Documentation. 


Stay Updated
Subscribe to our monthly Newsletter
CONTACT US 
Phone +1 (888) 841-3416
Fax +1 (866) 226-7529
813 Reddick St
Santa Barbara, CA 93103