KS0460 keyestudio Logic DC Jack Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[image:Ks0460-1.png|thumb|500px|right| Keyestudio Frog Robot for Arduino Graphical Programming]]
[[Image:Ks0460-1.png|500px|frameless]]<br>
   
   
<br>
<br>
Line 52: Line 52:
== Test Result ==
== Test Result ==
According to the wiring diagram, upload the test code successfully. After power-on, when the toggle switch is turned to the “OFF” end, the red LED is off; when the toggle switch is toggled at the “SW1” end, press the reset button on UNO R3 board, the red LED is on for 1 second, off for 4 seconds, alternately and circularly; when the toggle switch is toggled on the "ON" end, press the reset button on UNO R3 board, the red LED is off for 1 second, on for 2 seconds, and then off for 1 second, on for 1 second, alternately and circularly.
According to the wiring diagram, upload the test code successfully. After power-on, when the toggle switch is turned to the “OFF” end, the red LED is off; when the toggle switch is toggled at the “SW1” end, press the reset button on UNO R3 board, the red LED is on for 1 second, off for 4 seconds, alternately and circularly; when the toggle switch is toggled on the "ON" end, press the reset button on UNO R3 board, the red LED is off for 1 second, on for 2 seconds, and then off for 1 second, on for 1 second, alternately and circularly.
[[image:Ks0460-4.png|thumb|500px| Keyestudio Frog Robot for Arduino Graphical Programming]]
<br>[[Image:Ks0460-4.png|500px|frameless]]<br>

Revision as of 10:33, 24 September 2019

Ks0460-1.png


Description

When we design program to do experiments, we often need to use logical transformation.
The keyestudio Logic DC jack module comes with a logic conversion function that includes AND gates and NOR gates.
When in use, the toggle switch is turned to the "OFF" terminal, there is no output; when the toggle switch is toggled at the "SW1" terminal, the logic NOR gate function is implemented, and the IN1 input level and the OUT output level are opposite;
When the switch is toggled at the "ON" terminal, logic and function are implemented, and the IN1 level and the IN2 level are combined to obtain the OUT level.
The working voltage of the module is 5V.
There are two power supply modes. One connects 5V power supply to the module GND VCC; the other connects the DC 5.5-15V power supply to the black DC head of the module.
Special Note: When the module is connected to external power supply and other MCUs. The module must be connected to the microcontroller for common (GND) ground connection.


Technical parameters

  • Working voltage: DC 5V
  • External power supply: DC 5.5-15V
  • Working current: external power supply up to 2A
  • Maximum power: 7.5W
  • Display color: black and white
  • Operating temperature range: -20℃ to +60℃
  • Size: 47*24*13mm<b
  • Weight: 6.0g
  • Environmental attributes: ROHS


Wiring diagram


Ks0460-3.png

Test Code

  1. define IN1 2
  2. define IN2 3

void setup() {

 // put your setup code here, to run once:

pinMode(IN1,OUTPUT); pinMode(IN2,OUTPUT); }

void loop() {

 // put your main code here, to run repeatedly:

digitalWrite(IN1,LOW); delay(1000); digitalWrite(IN1,HIGH); delay(2000); digitalWrite(IN2,LOW); delay(1000); digitalWrite(IN2,HIGH); delay(1000); }


Test Result

According to the wiring diagram, upload the test code successfully. After power-on, when the toggle switch is turned to the “OFF” end, the red LED is off; when the toggle switch is toggled at the “SW1” end, press the reset button on UNO R3 board, the red LED is on for 1 second, off for 4 seconds, alternately and circularly; when the toggle switch is toggled on the "ON" end, press the reset button on UNO R3 board, the red LED is off for 1 second, on for 2 seconds, and then off for 1 second, on for 1 second, alternately and circularly.
Ks0460-4.png