How to connect with 4 sensor?

Submitted by funkoku on Wed, 07/07/2021 - 17:01

Good day Sir,

I stuck in this setps, basically my knowledge about arduino language is still new. I manage to copy paste and run for a single sensor example pH sesor.

However I still confuse, how do i code for 2 sensor , example Ph and turbidy sensor? how about 4 sensor?

Do just copy all the sensor code  in one coding and run it?

it would be much appriciated if you can point me to the right direction or example coding using 2 or more sensor.

Thanks and have a great day.

 

 

Is there any apps or website for arduino simulation ? currently my  equipmnet is limited.

 

  Joined July 07, 2021      1
Wednesday at 04:52 PM

you can use tinkarcad for this. you can also use proteus software.

  Joined July 16, 2021      50
Friday at 04:53 PM

You can copy all the sensor code into one sketch. Make sure that the variables are separetely declared.

  Joined February 12, 2018      696
Monday at 02:11 PM

No dont do like this ,

Every arduino caode has three importamt part,

1- defining varibales - Here you should define the all the variables which are going to be use in all the sensors.

2- void setup () - Here you should put setup code which will run only once, do it for all the sensors in single void setup ()

3- void loop () - Put your main code here which you want to run repeatedly, do it for all senors in single void loop ()

 

 

 

  Joined July 16, 2021      50
Friday at 04:53 PM