Tuesday 16 June 2015

Arduino ASCOM weather box (part 1)

I did some Visual Studio ASCOM development work in VBS and created a simple device driver for Arduino based weather box equipped with basic weather sensors. This was far more easier than I tought. From level zero knowledge into a working driver took only a couple of hours.

D:\JTR\Dropbox\VBS\AstroWeather>test.cmd

D:\JTR\Dropbox\VBS\AstroWeather>cscript test.vbs //Nologo
START
AAW - Arduino Astro Weather
VMDPV_1|1_VMDPV
23.34
35.12
1013
END

D:\JTR\Dropbox\VBS\AstroWeather>test.cmd

D:\JTR\Dropbox\VBS\AstroWeather>cscript test.vbs //Nologo
START
AAW - Arduino Astro Weather
VMDPV_1|1_VMDPV
23.34
35.12
1013
END

D:\JTR\Dropbox\VBS\AstroWeather>cat test.vbs'
WScript.Echo "START"

set fw = CreateObject("ASCOM.AAW.SafetyMonitor")

fw.Connected = True
Wscript.Sleep 5000

WScript.Echo fw.Name
Wscript.Sleep 5000

Wscript.StdOut.Write fw.CommandString("TEMPERATURE")
Wscript.StdOut.Write fw.CommandString("HUMIDITY")
Wscript.StdOut.Write fw.CommandString("PRESSURE")

WScript.Echo
Wscript.Sleep 5000

fw.Connected = False

WScript.Echo "END"

No comments:

Post a Comment