# Need help with code to trigger a relay and a switch button together

**URL:** <https://forum.arduino.cc/t/need-help-with-code-to-trigger-a-relay-and-a-switch-button-together/1262996>\
**Category:** General Guidance\
**Created:** [May 22, 2024, 1:17pm UTC](https://forum.arduino.cc/t/need-help-with-code-to-trigger-a-relay-and-a-switch-button-together/1262996 "2024-05-22T13:17:32Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![johnerrington](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnerrington/32/340106_2.png) [@johnerrington](https://forum.arduino.cc/u/johnerrington)\
**Post date:** [May 29, 2024, 2:59pm UTC](https://forum.arduino.cc/t/need-help-with-code-to-trigger-a-relay-and-a-switch-button-together/1262996/19 "2024-05-29T14:59:30Z")

</div>

> [@How to make a schematic you can post.](https://forum.arduino.cc/t/how-to-make-a-schematic-you-can-post/675103):
>
> When you submit a question on the forum you will usually need to add a schematic (circuit diagram). The tutorial that follows will explain some ways to create a useful image; however lets start by explaining how to add the image to your post. Its easy. Having created the image all you need to do is : Save the image somewhere convenient - maybe your desktop Start your post, and place the cursor (insertion point) where you want the image to be shown; [upload image to forum] 3: click th…

---

_[View the full topic](https://forum.arduino.cc/t/need-help-with-code-to-trigger-a-relay-and-a-switch-button-together/1262996)._
