How to connect with 4 sensor?

Submitted by funkoku on

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.

 

 

funkoku

  Joined July 07, 2021      1

Wednesday at 04:52 PM

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

 

Ashish Mishra

In reply to by funkoku

  Joined July 16, 2021      50

Friday at 04:53 PM

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

Sourav Gupta

  Joined February 12, 2018      696

Monday at 02:11 PM

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

Ashish Mishra

  Joined July 16, 2021      50

Friday at 04:53 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 ()

 

 

 

Add New Comment

Login to Comment Sign in with Google Log in with Facebook Sign in with GitHub