ARDUINO DOWNLOAD

Posted on
Sun May 08, 2016 9:58 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted 2.71

added ability to send 2 ...x pins at once

can be set in menu, action or script:
Code: Select all
plug = indigo.server.getPlugin("com.karlwachs.arduino")
# set s0 to 123 and s1 to 987 and send both at the same time to the megaWifi device
plug.executeAction("setPins",
   props={
   "device" :"1780896723" # or device name
   ,"pin": "s0"  #
   ,"CMD": "analogWrite"
   ,"aValue":"123"
   ,"sendORset":"setOnly"
   }
)
plug.executeAction("setPins",
   props={
   "device" :"1780896723" # or device name
   ,"pin": "S1"  #
   ,"CMD": "analogWrite"
   ,"aValue":"987"
   ,"sendORset":"setOnly"
   }
)
plug.executeAction("sendPins",
   props={
   "device" :"megawifi" # or device id
   ,"pinsToBeSend": "s0,s1"  #
   }
)

Posted on
Wed May 11, 2016 5:34 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted arduino.ino sketch file v 1-8-3


fixed: compiler problem with min() max() functions
min() max() functions replaced with if(){} statements to work around compiler bug.

Karl

Posted on
Mon May 16, 2016 4:37 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted arduino
plugin v 2.8.1
sketch v 1.91.

fixed:
action/menu send pin to arduino did not work properly

added support for MKR1000 (the analog in/ out resolution is set to 10 bits = 1023 max in the sketch and the plugin)
you need to install the wifi101 library in your arduino IDE to be able to use it.

supported PINS
Dx input/ output pins 0.. 8; (incl PWM function) ; 9/10 (if no SPI); 13 14(if no debug RX/TX) and 15(=A0 as DAC output only ); 18 (as A3 PWM output only ); 19(as A4 PWM output only)
Ax input: 0..7

One problem is the max time for ramp up/down for continuous ramping. It must not be > 10,000 msec (10 secs). Have not figured out why, must be some integer limitation, .. if any whats to looks at the code, please try to figure that out (9999 works 10000 does not)

Not impleneted are the trigger functions of the pins, but they should be part of you sketch anyway

this looks like a stable board, wifi is very fast, will let it run for some time.

Karl

Posted on
Sat Jun 11, 2016 9:18 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted arduino
plugin v 2.8.2
sketch v 1.9.2.


fixed:
plugin: "set and set" --> "set and send" in menu
ino file: "debug" --> "DEBUG" in #ifdefined and removed debug print statement

Karl

Posted on
Thu Jun 16, 2016 5:56 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

ARDUINO DOWNLOAD

posted new INO file

added: watch dog timer function
when the arduino/esp does not receive any messages from the plugin for xx milliseconds it will do a hard reboot.
you must connect the designated pin to the reset pin.
AND this connection must not be active when you load the program

No changes in the plugin needed

You must enable with in the INO file:
#define WATCHDOGenabled add a // in front you do not want this active

then change
maxWatchDogTimer to # of millisecs after witch the arduino should reboot if no message received from indigo e.g. 60000= 1 minute
watchDogTimerPin set to pin with is connected to reset pin.

this is not tested.!!

Karl

Posted on
Tue Jun 21, 2016 5:18 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

ARDUINO DOWNLOAD

posted new INO file 1.10.2

fixed and tested the WATCHDOG timer function.

with this function enabled the arduino will reboot if no HTTP request for 2 minutes received. (you can set the timeout parameters)

This was tested on an MKR1000

default settings:
-reset output pin = D7 connected to reset pin
-time with no message = 125 seconds
-no test in the first 2 minutes .. to give indigo time to connect. (takes max 1 minute)

no upgrade to the PLUGIN is needed. This function is fully contained on the arduino/ esp.. this should also work for the ESP.

MAKE SURE THAT YOU DO NOT WRITE a 0 to the reset pin (default D7) from within the plugin by accident. It will reboot the arduino immediately, ...
... Although you could use that as a function to reset the arduino if you like.

Karl

Posted on
Thu Jun 30, 2016 12:05 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

new plugin version 2.8.3

added: the arduino indigo-variables get cleared every 5 minutes. They are ONLY used by action or menu/set pin or direct plugin calls from python.
Their purpose is to give feedback to the calling programs for them to check if things went through.

In order not to confuse things they are now cleared (=empty) every 5 minutes so that they can not be confused with the devices/ states/status. They are NOT the same


Karl

Posted on
Mon Jul 25, 2016 10:36 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

Arduino.ino v 1.10.3 posted

fixed: now works with OneWire sensors

thanks go to Andrew for debugging and testing.


Karl

Posted on
Wed Aug 24, 2016 4:33 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

ARDUINO DOWNLOAD

posted indigo.ino-v-1-10-4

fixed: arduino IDE 1.6.11 is a bit more stricter than previous versions.
Fixed variable declarations for time variables from "long" to "unsigned long". (.10 tolerated it without complaining)

thanks to SAM for testing

Karl

Posted on
Wed Oct 05, 2016 6:45 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted 1.10.5 INO sketch file

fixed:
analog pin number was fixed. .. should be fixed now

karl

too many fixed :P

Posted on
Mon Mar 13, 2017 9:50 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted v 2-8-6

added
ESP16: D - pins 1-5 & 12-15 are now configurable in the plugin, besides the A1 analog pin (*)
There are no limitations in the default sketch on which ESP pins can be used. It is your responsibility to make sure you don't e.g. shutdown the device by e.g. resetting it e.g. D1, D2 .. depending on which ESP chip / pinout you are using.


Karl

Posted on
Sun Apr 02, 2017 12:29 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted new INO file v-1-11-6.

added:
softReset if no wifi for 5 minutes. this should do a soft reset = start "setup()" again, but will leave all external values the same .
You can remove that feature in section #define softReset and also change the timing.
Default is 5 minutes = 300000 milli-seconds (the arduino counter is is millisecs)

Karl

Posted on
Tue Jul 18, 2017 10:16 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted v 7-8-7

fixed:
if a string send to a string variable contain "not" it assumed that the arduino replied with "notConfigured". Now it tests for"notConfigured" and not just "not".

Karl

ps changed v to 7 had some indigo seven additions in my code for some time..

Posted on
Tue Sep 12, 2017 9:42 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted v 7-9-8

added support for relay board from sainsmart.
https://www.sainsmart.com/products/rj45-ethernet-control-board-for-8-16-ch-relays

Karl
Attachments
Screen Shot 2017-09-12 at 22.52.50.png
Screen Shot 2017-09-12 at 22.52.50.png (56.22 KiB) Viewed 13585 times
Screen Shot 2017-09-12 at 22.52.00.png
Screen Shot 2017-09-12 at 22.52.00.png (38.93 KiB) Viewed 13585 times

Posted on
Sat Dec 02, 2017 12:36 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO DOWNLOAD

posted bug fix for "in Line '790' has error='local variable 'props'" on indigo plugin store:

https://www.indigodomo.com/pluginstore/74/


Karl

Who is online

Users browsing this forum: No registered users and 1 guest