User Tools

Site Tools


arduino:bk3231

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:bk3231 [2017/08/07 20:46] – aistisarduino:bk3231 [2017/08/07 20:49] (current) – aistis
Line 2: Line 2:
  
 b26782h b26782h
 +
 +defaultinis pairinimosi slaptazodis 1234
  
 {{:arduino:pasted:20170807-192443.png}} {{:arduino:pasted:20170807-192443.png}}
Line 40: Line 42:
 Next: XBEE FT232RL Chip Serial Ports Expand Board USB to TTL Adapt Base Next: XBEE FT232RL Chip Serial Ports Expand Board USB to TTL Adapt Base
  
 +</code>
 +
 +jungti TX(1) i arduino 10, jungti rx(2) i arduino 11
 +
 +
 +<code c>
 +#include <SoftwareSerial.h>
 +
 +SoftwareSerial mySerial(10, 11); // RX, TX
 +
 +void setup() {
 +  // Open serial communications and wait for port to open:
 +  Serial.begin(38400);
 +  while (!Serial) {
 +    ; // wait for serial port to connect. Needed for native USB port only
 +  }
 +  pinMode(LED_BUILTIN, OUTPUT);
 +
 +  Serial.println("Goodnight moon!");
 +
 +  // set the data rate for the SoftwareSerial port
 +  mySerial.begin(9600);
 +  mySerial.println("Hello, world?");
 +}
 +
 +void loop() { // run over and over
 +  mySerial.println("Hello, world?");
 +  digitalWrite(LED_BUILTIN, HIGH); 
 +  delay(1000);
 +  digitalWrite(LED_BUILTIN, LOW);  
 +  delay(1000);
 +  /*
 +  if (mySerial.available()) {
 +    Serial.write(mySerial.read());
 +  }
 +  if (Serial.available()) {
 +    mySerial.write(Serial.read());
 +  }
 +  */
 +}
 </code> </code>
arduino/bk3231.1502127979.txt.gz · Last modified: by aistis