Pages: [1]   Go Down
Author Topic: Simple switch  (Read 193 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I gots this electric Imp and since Squirrel language is tough and I am barely trying to make C work for me, I am hacking someone elses Twitter code for Electric Imp. Anywayz, the original code involved a simple hardware switch between pin 7 on the Imp to ground to trigger Twitter response. It works just fine, but I want my arduino to act as the switch. I presume this is a matter of using the internal resisters of the allow the Imp to be grounded through a digital pin, hence acting like a simple switch.

The Imp uses the same power as the Arduino.
Logged

California
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a matter of using a relay/transistor/optoisolator/triac to create a "digital switch" the digital pin on the Arduino would be used to drive the component.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That stinks.  I will look at a SSR.  That said, I may just need to man-up and learn some Squirrel to make the Imp work better.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11164
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the original code involved a simple hardware switch between pin 7 on the Imp to ground to trigger Twitter response.

It would be worth finding out:

What voltage is on that pin when it is floating.
How low the voltage needs to be pulled down before the Imp will reliably detect that the switch has been operated.
How much current needs to be sunk in order to achieve that.

If the answers come out compatible with an Arduino digital pin then you would be able to connect it directly to the Arduino without needing any external drive components.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: