Archive for January, 2015
Program an Arduino Mega with SoapBox Snap, including Analog Outputs
Posted by scott in Soapbox Snap on January 11, 2015
SoapBox Snap version 2015.01.11 has just been released! You can download it from over at the SoapBox Snap Project Page.
This version adds support for the Arduino Mega, meaning you can now have a whopping 16 analog inputs and use all the way up to pin 53 on the Mega board. The Mega also supports almost 5 times as much space for your ladder logic program and more memory for discrete and numeric (i.e. analog) signals.
Additionally I’ve added support for analog outputs (for the Uno, Nano, and Mega). On the Uno and Nano boards, pins 3, 5, 6, 9, 10, and 11 are configurable as “PWM” (i.e. pulse width modulated) outputs. On the Mega board you can use pins 2 to 12 and 44 to 46. SoapBox Snap now supports configuring these pins as PWM outputs (using the new config-pwm command) which will make the pins show up under the Analog Outputs list rather than the Discrete Outputs list. In your ladder program, you can control these analog outputs by connecting a signal and driving it with any value from 0 to 255, and the output will vary accordingly.
I’ve updated the SoapBox Snap Arduino Tutorial.