How to connect with 4 sensor?

funkoku's picture

Offline

Joined: Jul 07, 2021

Replies: 1
How to connect with 4 sensor?
July 7, 2021 - 5:01pm

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's picture

Offline

Joined: Jul 07, 2021

Replies: 1

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

 

Ashish Mishra's picture

Offline

Joined: Jul 16, 2021

Replies: 49

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

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 627

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

Ashish Mishra's picture

Offline

Joined: Jul 16, 2021

Replies: 49

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 ()