Possibly damaged two Nano 33 BLE's trying to connect to app

see my later reply. it works

10 seconds later, the values should all change - did that happen?

I have seen that happen too with other Apps, long ago, now I always launch the App via the icon.

Values are remaining constant. Also It crashed several times on subsequent attempts to connect using the icon with the same error message. But I can keep trying and it will connect eventually. But the values never change.

The values don't change on the Arduino serial monitor either. I don't understand why. Looks like they should increment by 4.

I can see why :grin: --> Line 157: Next == true should be Next = true

FanControl9 will be ready soon if you are willing to lose more hair.

I don't understand that isn't Next a logical. If it should be = than shouldn't the Next == false also be Next = false.

I can do a #9 but tomorrow I'm back on the road for a week.

Next is a Boolean.
To test the value, use ==
To assign the value, use =

Fan_Control_9.aia (216.2 KB)
FanControl9.ino (6.8 KB)

Same results with #9, does not increment on the app or the serial monitor. It did get rid of the [ and ] but the " is still present for the first and last value. Looks like this

"10
11
12
13"

Hmm - I tested the modifications here (without Bluetooth) and they worked. Will be something subtle. Link up again in a week's time?

Fan_Control_10.aia (216.2 KB)
FanControl10.ino (6.9 KB)

That seems to work sort of. The numbers are incrementing by 4 except fan speed increments by a huge number and all numbers are huge. Below is the start of the serial print out. It starts with rad temp of 618 instead of 10? The output of the app is the same as the serial output.

22:24:06.455 -> Rad Level % is now: 618
22:24:06.455 -> Cnd Level % is now: 619
22:24:06.455 -> Aux Level % is now: 620
22:24:06.455 -> Fan Speed is now: 208825
22:24:16.443 -> Rad Level % is now: 622
22:24:16.443 -> Cnd Level % is now: 623
22:24:16.443 -> Aux Level % is now: 624
22:24:16.443 -> Fan Speed is now: 218830
22:24:16.443 -> Rad Level % is now: 626
22:24:16.443 -> Cnd Level % is now: 627
22:24:16.443 -> Aux Level % is now: 628
22:24:16.443 -> Fan Speed is now: 218831
22:24:26.478 -> Rad Level % is now: 630
22:24:26.478 -> Cnd Level % is now: 631
22:24:26.478 -> Aux Level % is now: 632
22:24:26.478 -> Fan Speed is now: 228836

I think I figured out why the numbers are high. I think the sketch was running for a while before I turned on the serial monitor. But that doesn't explain the fan speed.

Yes that's it. When I open the serial monitor before the app connects rad temp starts at the correct number and increments perfectly. But fan speed starts ok, but does not incrementing correctly.

22:43:42.091 -> Connected to central: 5b:ca:2d:16:24:6e
22:43:42.091 -> Rad Level % is now: 10
22:43:42.091 -> Cnd Level % is now: 11
22:43:42.091 -> Aux Level % is now: 12
22:43:42.091 -> Fan Speed is now: 13
22:43:42.091 -> Rad Level % is now: 14
22:43:42.091 -> Cnd Level % is now: 15
22:43:42.091 -> Aux Level % is now: 16
22:43:42.091 -> Fan Speed is now: 123068
22:43:52.126 -> Rad Level % is now: 18
22:43:52.126 -> Cnd Level % is now: 19
22:43:52.126 -> Aux Level % is now: 20
22:43:52.126 -> Fan Speed is now: 133073
22:44:02.115 -> Rad Level % is now: 22
22:44:02.115 -> Cnd Level % is now: 23
22:44:02.115 -> Aux Level % is now: 24

Well that's good :joy:

.... and that is very strange :thinking: Though of course these are fake values anyway, just to get the comms correct.

IgSensorVal is declared as an array of length 3, that is index 0..2, so FanSpeed index 3 is outside this array. Hope this will make it work

I spotted that Rolf but thank you for pointing it out - what is strange is that the correct value for index 3 was reported on first iteration of the loop! Would be nice if the Arduino IDE could pick-up typos of that ilk but it is pretty basic really.

Not to familiar with C or Arduino language, but I understood int igSensorVal[3]; to include [0] to [3] not so. I have an hour or so to give it a try.

Thanks

@rkl099 @ChrisWard

All works perfectly with igSensorVal[4].

This is both on the serial monitor and the app.

Thanks guys. I will be out of town for about a week. Last time I went out of town for a week, 3 BLE's that appeared to be dead started working. Be interesting to see if the dead one I have here starts working. Stay tuned and Thank You.

07:51:39.571 -> Connected to central: 78:ef:94:a9:61:c4
07:51:39.571 -> Rad Level % is now: 10
07:51:39.571 -> Cnd Level % is now: 11
07:51:39.571 -> Aux Level % is now: 12
07:51:39.571 -> Fan Speed is now: 13
07:51:49.562 -> Rad Level % is now: 14
07:51:49.562 -> Cnd Level % is now: 15
07:51:49.562 -> Aux Level % is now: 16
07:51:49.562 -> Fan Speed is now: 17
07:51:59.575 -> Rad Level % is now: 18
07:51:59.575 -> Cnd Level % is now: 19
07:51:59.575 -> Aux Level % is now: 20
07:51:59.575 -> Fan Speed is now: 21
07:52:09.581 -> Rad Level % is now: 22
07:52:09.581 -> Cnd Level % is now: 23
07:52:09.581 -> Aux Level % is now: 24
07:52:09.581 -> Fan Speed is now: 25
07:52:19.570 -> Rad Level % is now: 26
07:52:19.570 -> Cnd Level % is now: 27
07:52:19.570 -> Aux Level % is now: 28
07:52:19.570 -> Fan Speed is now: 29
07:52:29.606 -> Rad Level % is now: 30
07:52:29.606 -> Cnd Level % is now: 31
07:52:29.606 -> Aux Level % is now: 32
07:52:29.606 -> Fan Speed is now: 33
07:52:39.587 -> Rad Level % is now: 34
07:52:39.587 -> Cnd Level % is now: 35
07:52:39.587 -> Aux Level % is now: 36
07:52:39.587 -> Fan Speed is now: 37