Edit Arduino sketch...
 
Notifications
Clear all

Edit Arduino sketch and add some code

4 Posts
2 Users
0 Reactions
4,857 Views
(@ch_andersen)
New Member
Joined: 3 years ago
Posts: 4
Topic starter  

Hello, 

I have a toggle switch and I would like to have the arduino to do a buttonpress if pin 0 detects power. I found a youtube video and it looks very simple - if you write the sketch from scratch.

 

Anyone knows if this is possible in combination with simhub? 

 

Youtube video: 

 


   
Quote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

hello

i am actually looking for the same but unfortunately i am in a foreign country and cannot test my code and watch your video due to the firewall  but you can add some personnal sketch:

open displayclientv2 with the Arduino IDE or from the simhub sketch editor file>open with arduino IDE

clic on the right top triangle of the editor and select SHCUSTOMPROTOCOL.H

from this point you can edit the file and add your code and library;use the already in place void setup and loop

i found a non tested sketch that could fit for this:

https://forum.arduino.cc/t/toggle-switch-act-like-a-button/118566/4

keep me in touch i should come back next at home and try it on my setup

 


   
ReplyQuote
(@ch_andersen)
New Member
Joined: 3 years ago
Posts: 4
Topic starter  

Hello, 

 

It crashes when i try to upload. So I think this is above my level 🙂


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52

   
ReplyQuote
Share: