Arduino Nano weirdness
Wil
10月 01 2024 | 2:19 午前
This is difficult to explain and difficult to get an accurate screenshot - will try
I am using the following code provided by @Source Audio - thanks!
//
Arduino Nano - Utrasonic sensors-
I have 2 sensors connected for testing
In screenshot 1 - nothing is in front of the sensors - they are seeing far
screenshot 2
if I wave my hand in front sensor 1 - sensor 2 is effected
this is the problem that I cannot solve
screenshot 3
if I wave my hand in front of sensor 2- sensor 1 is not effected
//
the sensors are far apart from each other, and I have double check connections by switching around different sensors
//
I also have 2 different Nano boards - one seems to be older and requires ATmega328P to upload the code, while the newer board works fine uploading normal Arduino Nano - Both are producing the same results
//
Question - why is sensor 1 effecting other inputs?
Source Audio
10月 01 2024 | 8:32 午前
I would ground unused input pins
or remove reference to unused sensor pins If you connect less sensors.
do you have latest library ?
I used it only with 1.x arduino versions, not with 2.
your printout looks strange, every change in sensor input should produce only
index and value.
but you get non indexed zeros ?
then - detecting change while using floats makes not much sense.
you could remove it
or use threshold instead,
Wil
10月 01 2024 | 9:29 午前
Wil
10月 01 2024 | 9:41 午前
reply above -
No - what is happening with Threshold it pauses sensor 2 - when I play sensor 1 & 2, 2 is getting stuck- it is spilling over into empty slot 3.
Wil
10月 01 2024 | 10:27 午前
SOURCE AUDIO - might be something I did - It was working fine in mid-August
can you check my code please?
Source Audio
10月 01 2024 | 10:33 午前
Did you remove unused sensor pins from the code ?
can you try the simple version I posted,
without change and threshold ?
maybe move input pins away from trigger pin.
for example trigger pin 2, inut pins 7 8 9 10
Source Audio
10月 01 2024 | 10:57 午前
I looked at your max patch.
There is nothing wrong there.
Mistake could be in that library in combinatin with new
Arduino version ?
Or you have floating and jittery inputs.
Wil
10月 01 2024 | 11:35 午前
Same - echo 9-10
Simplified code
When I hover sensor 1 - effecting data 2
Hover sensor 2 is ok.
//
But if I do this - for 8 sensors
And plug sensors into echo 3/10
scroll through the video slowly - 0 is not effecting 7, but 0 is bleeding into 1
7 is not effecting 1
//
This was my solution for a performance last weekend -> set up code for 8 sensors. But only use 4
Echo 3 sensor 1
Echo 5 sensor 2
Echo 7 sensor 3
Echo 9 sensor 4
I had to close sensor 2 gate on the Max end, during the show cause it was freaking out!
//
Now ready for 8 sensors - must be something simple wrong
//
Tried 2 different breadboards-
Source Audio
10月 01 2024 | 11:52 午前
Don't use breadboards.
Solder sensor wires directly or use connectors which are soldered
on both sides and have solid connections, otherwise you will have problems that you describe .
Wil
10月 01 2024 | 12:18 午後
Mistake could be in that library in combinatin with new
Arduino version ?
I will uninstall and go backwards - let you know
Don't use breadboards.
:0 - that's just going to be a spaghetti mess to carry around - 0:
Solder sensor wires directly or use connectors which are soldered
I can see the point - though I no idea how to do that without breadboard
-research-
Source Audio
10月 01 2024 | 12:32 午後
You don't need to uninstall arduino,
just use older version along new one.
I mean in case you use version 2 and higher, which I suppose if you need to install
atmega328p hardware definitions ...
Anything lower than 2 is considered "legacy"
and should be compatible with that 3 years old library.
ultrasonic sensors are really sensitive to any jitter,
because they measure pulses (echo) in microseconds range.
Wil
10月 02 2024 | 1:51 午前
What gauge wire should use ? If I want buy a spool for making longer
Wil
10月 02 2024 | 4:05 午前
After some early morning cannibalism - some of the bleeding has been cauterized!
Solder 4 cables into 1 - no breadboard
Still not 100% - but doing what I need for now
Get some more supplies- especially cables - make it fancy!
Source Audio
10月 02 2024 | 7:18 午前
have a look in here about cables and lengths
in short telephone cables 0.15 mm gauge worked well over 8 meters
Wil
10月 02 2024 | 9:23 午前
Thanks ☎️📞📵 .