Go Down

Topic: Mikrotik + Arduino + LCD (Read 5371 times) previous topic - next topic


May 09, 2013, 10:44 pm Last Edit: May 09, 2013, 10:47 pm by HugoPT Reason: 1
Hi everyone
I want to share my recent weekend Arduino Project where I connect the powerfull Mikrotik RouterBoard to the Arduino using the USB native port on Mikrotik. My idea was enable the LCD module in the Mikrotik and them received  data in Arduino and pass it to an LCD HD44780 using an I2C Bus.
Here is the code I used to accomplish the task.
Code: [Select]
Writen by Hugo Santos
e-mail: hugo.santos@i9box.net
For more info please visit
Not translated yet, maybe next week :)
#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

SoftwareSerial mikrotik(10, 11); // RX, TX

bool validDataFound = false;
char buffer[100];

void setup()  
 writeLcd("Reading Mikrotik");

void loop()

void writeLcd(char * name)
 lcd.setCursor(1,0);//Collum 1, Row 0
 lcd.print("Arduino + Mikrotik");
 lcd.setCursor(3,1);//Collum 3, Row 1
 lcd.print("Mikrotik name:");
 lcd.setCursor(3,2);//Collum 3, Row 2  

void findMarker()
 byte tester;
       tester = mikrotik.read();
  if(tester == 0x3A)break; //Means de marker : has been found  
void storeData()
uint8_t i =0;
byte temp;
buffer[0] = '\0';
    temp = mikrotik.read();
    if(temp != 0x20 )
      //Insert the byte on the char array
      validDataFound = true;
      buffer[i++] = temp;
      buffer[i] = '\0';
    if(validDataFound == true && temp == 0x20)
      validDataFound = false;

Here is the final result.Nothing particular remarkable just a raining weekend in Portugal  :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131