ARDUINO plugin discussion

Posted on
Fri Sep 09, 2016 12:08 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

The iPhone kinda works but not reliable. It switches off its ble signal.

Will walk you through when you get it.



Sent from my iPhone using Tapatalk

Posted on
Fri Sep 09, 2016 12:13 pm
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: ARDUINO plugin discussion

It's not a big deal...the Android one is more important since he doesn't have access to the system. I'm currently using Home Remote on the iPhone to trigger when I get home via geofencing, so I'm ok.

Dunno if the iPhone 7 Plus might allow smoother BLE stuff...should have it in 2-3 weeks (pre-orders opened at 2am central and by 2:30a shipping days had started slipping a 1-2 weeks.)

iOS 10 might have more BLE capabilities since its designed for the new wireless headphones and all.

Posted on
Fri Sep 09, 2016 1:01 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

Its a principle thing. The phones want to save battery and hence they switch off communication signals after some minutes. Their signal strength are high ~ 0 dBm.
Ibeacons send a very short package every 0.x seconds at ~ -60dBm. Their battery lasts 6- 12 months. They are ideal for presence detection.


Sent from my iPhone using Tapatalk

Posted on
Fri Sep 09, 2016 6:29 pm
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: ARDUINO plugin discussion

Went to convert the sketch to FREE device and found a typo in the sketch.

Code: Select all
//
#if defined(FREEdevcie)
     #define maxAnalogValue 10000
     #define serialBaudRate 57600
#endif 

FREEdevcie typo instead of FREEdevice

I corrected my base sketch.

Now, when I tried to compile and upload the dual DHT sketch, I ran out of memory.

Code: Select all
Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

WARNING: Category '' in library UIPEthernet is not valid. Setting to 'Uncategorized'

Sketch uses 24,668 bytes (76%) of program storage space. Maximum is 32,256 bytes.
Global variables use 2,510 bytes (122%) of dynamic memory, leaving -462 bytes for local variables. Maximum is 2,048 bytes.
processing.app.debug.RunnerException: Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
   at cc.arduino.Compiler.size(Compiler.java:319)
   at cc.arduino.Compiler.build(Compiler.java:156)
   at processing.app.Sketch.build(Sketch.java:1111)
   at processing.app.Sketch.exportApplet(Sketch.java:1146)
   at processing.app.Sketch.exportApplet(Sketch.java:1132)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2409)
   at java.lang.Thread.run(Thread.java:745)
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Commented out and turned off DEBUG and now I get it down to:

Code: Select all
Sketch uses 22,784 bytes (70%) of program storage space. Maximum is 32,256 bytes.
Global variables use 2,106 bytes (102%) of dynamic memory, leaving -58 bytes for local variables. Maximum is 2,048 bytes.

Any ideas for reducing the last bit of memory to fit?

I'm definitely down for moving to the RPi, but don't want to lose the $ invested in the Arduino hardware either.

Posted on
Fri Sep 09, 2016 6:36 pm
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: ARDUINO plugin discussion

Nevermind...I forgot I had another MEGA board in my stash so I just changed the hardware to that and no more memory issues. I'll use the more limited UNO units for simple stuff like single DHT or ONEWIRE units, plus the digital pins for some magnetic sensors I have.

Posted on
Fri Sep 09, 2016 7:45 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

make sure you select UNO for an UNO. the default UNO setup leave some 500 bytes for variables

if you run into problems you can empty the special function ( delete all like besides {} ). that should give you some bytes ... but the UNO is indeed limited in RAM. It is MANY years old..


Karl

Posted on
Tue Sep 20, 2016 1:32 am
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: ARDUINO plugin discussion

Finally I've set up an UNO and a DS18B20 to read the temp.

In the device setting I have PIN 2 set as INPUT
The device is created, but I have no clue where to set something in the plugin?
Which menu option from the plugin do I have to use? "Plugin Set Pin"?
How can I read the temperature?
Do I have to set a variable first? Where in the plugin?

Karl, please help! :roll:

Yassi
Attachments
Plugin Set Pin.jpg
Option "Plugin Set Pin"
Plugin Set Pin.jpg (48.39 KiB) Viewed 4353 times
Arduino Pins.jpg
Arduino Pins
Arduino Pins.jpg (29.83 KiB) Viewed 4353 times
Device.jpg
Device
Device.jpg (92.38 KiB) Viewed 4353 times

Posted on
Tue Sep 20, 2016 7:06 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

In the sketch you read d2, write the temp to eg s0. In the plugin you read s0
No d2 in the plugin


Sent from my iPhone using Tapatalk

Posted on
Tue Sep 20, 2016 12:26 pm
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: ARDUINO plugin discussion

kw123 wrote:
In the sketch you read d2, write the temp to eg s0. In the plugin you read s0
No d2 in the plugin


Sent from my iPhone using Tapatalk


Karl, ok.

But in which of the options in the plugin do I have to enter it?
Can you send me please a screenshot?
I can't check it out! :shock:
Attachments
Bildschirmfoto 2016-09-20 um 20.24.31.png
Bildschirmfoto 2016-09-20 um 20.24.31.png (34.26 KiB) Viewed 4307 times
Bildschirmfoto 2016-09-20 um 20.24.05.png
Bildschirmfoto 2016-09-20 um 20.24.05.png (28.23 KiB) Viewed 4307 times
Bildschirmfoto 2016-09-20 um 20.23.46.png
Bildschirmfoto 2016-09-20 um 20.23.46.png (39.22 KiB) Viewed 4307 times

Posted on
Tue Sep 20, 2016 12:53 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

in device edit you define the mode of the pin (enable/disable S0 variable = input)

the output is for sending data to the arduino

Posted on
Tue Sep 20, 2016 12:59 pm
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: ARDUINO plugin discussion

kw123 wrote:
in device edit you define the mode of the pin (enable/disable S0 variable = input)

the output is for sending data to the arduino


I don't have in device edit ("enable/ disable S0 variable") input.
Only off, read fro string and output???

I think we have to do it via Teamviewer when you have the time.
I'm completely confused now. :roll:
Attachments
Bildschirmfoto 2016-09-20 um 20.56.05.png
Bildschirmfoto 2016-09-20 um 20.56.05.png (20.74 KiB) Viewed 4391 times

Posted on
Tue Sep 20, 2016 1:00 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

read from string

Posted on
Tue Sep 20, 2016 1:14 pm
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: ARDUINO plugin discussion

kw123 wrote:
read from string


Ok, last try for today, then I will give it up.

That's what i have now set in the device and plugin.

Temp doesn't appear
Attachments
Bildschirmfoto 2016-09-20 um 21.12.11.png
Plugin settings
Bildschirmfoto 2016-09-20 um 21.12.11.png (39.26 KiB) Viewed 4386 times
Bildschirmfoto 2016-09-20 um 21.11.49.png
Device settings
Bildschirmfoto 2016-09-20 um 21.11.49.png (295.49 KiB) Viewed 4386 times
Bildschirmfoto 2016-09-20 um 21.12.22.png
Pin S0
Bildschirmfoto 2016-09-20 um 21.12.22.png (14.79 KiB) Viewed 4386 times

Posted on
Tue Sep 20, 2016 1:15 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

ONLY one setting:
SO read. NOTHING ELSE !!!!

D2 off ..

Posted on
Tue Sep 20, 2016 1:20 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: ARDUINO plugin discussion

then make sure S0 gets filled in the sketch in doMystuff()

Page 27 of 34 1 ... 24, 25, 26, 27, 28, 29, 30 ... 34

Who is online

Users browsing this forum: No registered users and 3 guests