Serial communication Arduino

From my last post (Arduino-oled-display) I added a new function that allows me to send notification/messages from my terminal (linux) to my Arduino and it shows it through the little Oled screen. Here I will share the commands and code lines to get done the serial communication on your project. void loop() { while (Serial.available() > 0) { char recieved = Serial.read(); inData += recieved; // Process message when new line character is received if (recieved == '\n') { Serial.print("Arduino Received: "); Serial.print(inData); //digitalWrite(ledPin, HIGH); // if(inData == "HELLO\n") { // DON'T forget to add "\n" at the end of the string. Serial.println("HELLO"); //digitalWrite(ledPin, LOW); display.clearDisplay(); display.setCursor(0,0); display.setTextSize(2); display.print("Hi jose!"); display.display(); delay(3000); } inData = ""; // Clear received buffer } } }

2020-11-27

Open a Nextcloud's DB through a ssh connection

The following post explains how to open and connect your Nextcloud’s DB (MariaDB) by a ssh tunnel. Field description: Server side(GNULinux): Nextcloud: running on Docker-compose engine. OS: Debian with Docker compose installed. Database: MariaDB. Localhost side(GNULinux): OS: Fedora. CLient: Dbeader 7.2.5 Further information you can go to my docker compose Statement here. Edit your docker-compose.yml and add the “ports” key into the statement. $ nano docker-compose.yml ports: - 5555:3306 port: 5555 –> Host. port: 3306 –> Container. From the above the port “5555” it was used as example. ...

2020-11-23

Nextcloud bot as Notification System

Following the last post, where I shared how to use Telegram’s bot; on this post I’m going to explain how implement it by Chat Nextcloud API. This post is useful for those have a Nexctcloud deployment running at home/cloud. Assuming you have already Nextcloud up and running, we can create the new user, that we are gonna use it as “BOT” we will need the chat room token and the “BOT” credentials. ...

2020-10-09

Telegram Bot as Notification System

From one older post “Create a job using crontab” I used into my script the service exim4/ssmtp as mail server using gmail, but as we’re trying to walk away of Google’s jaw, I switched my notification engine to Telegram by an API service(bot)… almost it’s a step forward ! :) Requirement: Bot (Telegram) Web Browser Terminal(script) I will assume you have already set up your Bot on Telegram with BotFather When you have already created your Bot you can check by the API through a web browser ...

2020-09-24

How to deploy Wordpress + Mariadb using Docker

Below you will see the statement I used to deploy a Wordpress as db mariadb (mysql); I shared it to you, cos I’ve been looking out for a good .yml statement piece, but some of them are older or put other set frontend as nginx, etc. I did a simple and easier deployment statement, so here we have: version: '3.3' services: wordpress: depends_on: - db image: wordpress:latest volumes: - ./html:/var/www/html ports: - "8080:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: password links: - db depends_on: - db db: image: mariadb:10.5.4-focal volumes: - ./db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: SECRET MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: password ports: - "3306:3306" You can switch the local mount to volume mount it will depend of you design. ...

2020-08-08

OpenVPN usando Raspberry Pi3 + Noip

Requisitos: RaspberryPi –> https://www.raspberrypi.org/downloads/raspberry-pi-os/ OpenVPN –> https://pivpn.io/ Cuenta abierta –> https://www.noip.com/ Una IP Estatica en tu Raspberry –> Router manual Router con capacidad de tunel VPN —> IPsec, PPTP, L2TP. Public IP —> https://www.whatismyip.net/ Pasos: 1. Crear DNS Record A en Noip Apunta tu IP publica Abre tu sesion con tus credenciales en Noip Dentro del Dashboard ve al apartado “Dynamic DNS > Create Hostname” rellena: hostname, ejemplo: test Domain, ejemplo: ddns.net IPv4 address: Tu IP publica Click en Crear ...

2020-07-15

Setup Podman service in Silverblue by Systemd

Into my Devops learning path 👨‍💻 I decided to deploy a monitoring centre into my workstation where I could be able to watch my containers, resources, logs, etc and continue improving my knowledge, in my case I’m using Silverblue developed by Fedora so in here it’s a little bit different the setup; as monitoring tool I choose Cockpit for its great integration and support. Workstation: Silverblue 🖥️ Container engine: Podman ⚙️ Monitoring tool(app/service):Cockpit 📦 I splinted out the instructions in 4 simple parts: ...

2020-07-07

How to set your Domain name in Linux

Resume to set a domain name in Linux concepts: FQDN (Fully Qualified Domain Name) eg: hostname = server1 // FQDN = server1.example.com 1. First add FQDN to your hostname in /etc/hosts file. # cat /etc/hosts 10.120.68.23 server1.example.com server1 confirm the FQDN issue the following command: # hostname -f server1.example.com 2.1. Configure domain name (Red Hat RHEL, Fedora and CentOS) From these path add the parameters needs vi /etc/sysconfig/network DOMAINNAME=<domainname> vi /etc/sysctl.conf kernel.domainname = <domainname> 2.2. figure domain name ( Ubuntu, Debian) #vi /etc/hostname server1 Then restart the service: ...

2020-05-31

Display OLED Arduino

On this post I’ll explaining how to setup a little OLED screen 128X64 on Arduino Leonardo Tools: Chit: Arduino Leonardo Screen: Led OLED display 128x64 bought here Workstation: Silverblue Fedora 33 Compiler: Arduino IDE Over here you can see the connection diagram. Steps: Install the Arduino IDE from Flathub repo. Now you have the flatpak Arduino app, below you will see older information related to a bug of the last Arduino Flatpak version, but now it fixed. Please continue with the 3th step. 2. Launch the Arduino IDE: ...

2020-05-17

LineageOS 17.1 in Xiaomi A2 Lite (Daisy)

LineageOS17.1 in Xiaomi A2 Lite (Daisy) The follow instructions are done by adb and twrp commands line. OS used: Windows 10 Requirement: adb fastboot tool USB drivers Xiaomi driver Set into your android device: USB debugging option enable. Disable Encryption on the phone (DisableForceEncryption.zip) Packages(download and leave the installation packages into your mobile SD): LineageOS 17.1 for Xiaomi “Daisy” TWRP GApps Press the dlower button + power button to boot in Plug the mobile on your pc. Open adb terminal tool (C:\Program Files (x86)\Minimal ADB and Fastboot\cmd-here.exe) and test it by: adb devices Fastboot boot twrp.img –> in my case I use: twrp-daisy-3.3.1-0-offain.img it worked for my device :) Make sure to create a backup (System, Data and Boot). Then wipe the data partition, cache partition and the system partition (on this step you will lose all your data). adb shell twrp wipe data twrp wipe cache twrp wipe system Install LineageOS17 image by TWRP commands and restart to TWRP mode again. twrp install /external_sd/LineageOS17/lineage-17.1-20200413-UNOFFICIAL-daisy.zip exit adb reboot bootloader Install Gapps (google play market) adb shell twrp install /external_sd/LineageOS17/BiTGApps-arm64-10.0.0-v0.6_signed.zip exit switch to slot if you are been in the A slot now switch boot onto B fastboot getvar current-slot --to know which slot you are fastboot set_active b -- If you were at A slot so switch to B adb reboot Below I left a couple of links were useful for me; I strong recommended to backup all your data before to start, as well as count with other phone in case you get in trouble with the installation. ...

2020-04-03