Digitalread and DigitalWrite
Can we use this type of code in such a way that firstly it will read the status of a digital pin and then give a command to another digital pin to low or high signal as per my requirement.

@yeshwant.naik you said we can “However you can check it programmatically by storing the last status in a variable and then using it in your further checks/decision making.”

Please tell me ho do we do that, coz i’hv tried reading from digitalRead also i’hv tried reading from serialRead and that too via python and API commands but are not working
also to let you know the write functions are working robustly on both digital and serial but cannot read
please help!!