Level Shifting Tutorial Schematics
Level Shifting with a Voltage Divider |
Level Shifting with a NPN Transistor |
/*The code was used for the Arduino Uno and Duo, whichever was acting as the serial communication transmitter in the tutorial at the time. This code is free and open to all to use. */
void setup() {
//Want to use fast baud rate for this example
Serial.begin(115200);
}
void loop() {
// Just transmit same message over and over
Serial.write("forcetronics\n");
delay(10);
}
Level Shifting RX Arduino Sketch
/*The code was used for the Arduino Uno and Duo, whichever was acting as the serial communication reciever in the tutorial at the time. This code is free and open to all to use. */
void setup() {
//Want to use a fast baud rat
Serial.begin(115200);
}
void loop() {
//look for a serial data and print it
while(Serial.available()) {
char c = (char)Serial.read();
Serial.print(c);
}
delay(2);
}
The transistor circuit makes no sense! This is wht you wanted to do: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlGNUt-YJoHt65Ssfe0U2QOazj7JieThSPd_tUOGkdFtbgyK0j
ReplyDeleteHey Marius, The circuit I posted worked fine for me and you can see the test results in the video. Can you provide some insight into where the theory of the posted level shifting circuit breaks down? Always looking to learn and fix mistakes, thanks.
Delete