RF transmitter gerber
// transmitter.pde
#include <VirtualWire.h>
const int buttonPin10 = 0;
const int buttonPin11 = 1;
const int buttonPin0 = 2;
const int buttonPin1 = 3;
const int buttonPin2 = 4;
const int buttonPin3 = 5;
const int buttonPin4 = 6;
const int buttonPin5 = 7;
const int buttonPin6 = 8;
const int buttonPin7 = 9;
const int buttonPin8 = 10;
const int buttonPin9 = 11;
int buttonState0 = 0;
int buttonState1 = 0;
int buttonState2 = 0;
int buttonState3 = 0;
int buttonState4 = 0;
int buttonState5 = 0;
int buttonState6 = 0;
int buttonState7 = 0;
int buttonState8 = 0;
int buttonState9 = 0;
int buttonState10 = 0;
int buttonState11 = 0;
void setup()
{
// Serial.begin(9600); // Debugging only
// Serial.println("setup"); // Prints "Setup to the serial monitor"
pinMode(buttonPin0, INPUT);
pinMode(buttonPin1, INPUT);
pinMode(buttonPin2, INPUT);
pinMode(buttonPin3, INPUT);
pinMode(buttonPin4, INPUT);
pinMode(buttonPin5, INPUT);
pinMode(buttonPin6, INPUT);
pinMode(buttonPin7, INPUT);
pinMode(buttonPin8, INPUT);
pinMode(buttonPin9, INPUT);
pinMode(buttonPin10, INPUT);
pinMode(buttonPin11, INPUT);
vw_set_tx_pin(13); // Sets pin D12 as the TX pin
// vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(4000); // Bits per sec
}
void loop()
{ buttonState0 = digitalRead(buttonPin0);
buttonState1 = digitalRead(buttonPin1);
buttonState2 = digitalRead(buttonPin2);
buttonState3 = digitalRead(buttonPin3);
buttonState4 = digitalRead(buttonPin4);
buttonState5 = digitalRead(buttonPin5);
buttonState6 = digitalRead(buttonPin6);
buttonState7 = digitalRead(buttonPin7);
buttonState8 = digitalRead(buttonPin8);
buttonState9 = digitalRead(buttonPin9);
buttonState10 = digitalRead(buttonPin10);
buttonState11 = digitalRead(buttonPin11);
const char *msg0 = "0";
const char *msg1 = "1";
const char *msg2 = "2";
const char *msg3 = "3";
const char *msg4 = "4";
const char *msg5 = "5";
const char *msg6 = "6";
const char *msg7 = "7";
const char *msg8 = "8";
const char *msg9 = "9";
const char *msg10 = "a";
const char *msg11 = "b";
const char *msg12 = "c";
const char *msg13 = "d";
const char *msg14 = "e";
const char *msg15 = "f";
const char *msg16 = "g";
const char *msg17 = "h";
const char *msg18 = "i";
const char *msg19 = "j";
const char *msg20 = "k";
const char *msg21 = "l";
const char *msg22 = "m";
const char *msg23 = "n";
if (buttonState0 == HIGH)
{
vw_send((uint8_t *)msg0, strlen(msg0)); //button 0
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg1, strlen(msg1));
vw_wait_tx();
}
if (buttonState1 == HIGH)
{
vw_send((uint8_t *)msg2, strlen(msg2)); //button 1
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg3, strlen(msg3));
vw_wait_tx();
}
if (buttonState2 == HIGH)
{
vw_send((uint8_t *)msg4, strlen(msg4)); //button 2
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg5, strlen(msg5));
vw_wait_tx();
}
if (buttonState3 == HIGH)
{
vw_send((uint8_t *)msg6, strlen(msg6)); //button 3
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg7, strlen(msg7));
vw_wait_tx();
}
if (buttonState4 == HIGH)
{
vw_send((uint8_t *)msg8, strlen(msg8)); //button 4
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg9, strlen(msg9));
vw_wait_tx();
}
if (buttonState5 == HIGH)
{
vw_send((uint8_t *)msg10, strlen(msg10)); //button 5
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg11, strlen(msg11));
vw_wait_tx();
}
if (buttonState6 == HIGH)
{
vw_send((uint8_t *)msg12, strlen(msg12)); //button 6
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg13, strlen(msg13));
vw_wait_tx();
}
if (buttonState7 == HIGH)
{
vw_send((uint8_t *)msg14, strlen(msg14)); //button 7
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg15, strlen(msg15));
vw_wait_tx();
}
if (buttonState8 == HIGH)
{
vw_send((uint8_t *)msg16, strlen(msg16)); //button 8
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg17, strlen(msg17));
vw_wait_tx();
}
if (buttonState9 == HIGH)
{
vw_send((uint8_t *)msg18, strlen(msg18)); //button 9
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg19, strlen(msg19));
vw_wait_tx();
}
if (buttonState10 == HIGH)
{
vw_send((uint8_t *)msg20, strlen(msg20)); //button 9
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg21, strlen(msg21));
vw_wait_tx();
}
if (buttonState11 == HIGH)
{
vw_send((uint8_t *)msg22, strlen(msg22)); //button 9
vw_wait_tx();
delay(30); }
else
{
vw_send((uint8_t *)msg23, strlen(msg23));
vw_wait_tx();
}
}
RF transmitter gerber
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- RichardV31 Aug 14,2018
- 1 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
8design
-
9usability
-
8creativity
-
9content
More by AKASH KODU
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
127 0 0 -
DIY Laser Power Meter with Arduino
184 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
167 0 2 -