Skip to content

Instantly share code, notes, and snippets.

View salmanfarisvp's full-sized avatar
:octocat:
Start where you are. Use what you have. Do what you can.

Salman Faris salmanfarisvp

:octocat:
Start where you are. Use what you have. Do what you can.
View GitHub Profile
/*
Originally from MQTT ESP8266 Example
Basic XIAO-ESP32 MQTTS example
Before starting , You should have
- MQTT Broker Name
- MQTT Broker Username
- MQTT Borker Password
@salmanfarisvp
salmanfarisvp / Guide.md
Created May 25, 2023 11:02
Balena CLI Installation on WSL

This guide will show how to Install balena CLI for WSL

  1. Download the latest zip file from the latest release page. Look for a file name that ends with "-standalone.zip", for example: balena-cli-vX.Y.Z-linux-x64-standalone.zip.

  2. Extract the zip file contents to any folder you choose, for example /home/balena. The extracted contents will include a balena-cli folder.

  3. Open the WSL terminal inside the balena-cli folder and make the file executable by entering the command sudo chmod +x balena

@salmanfarisvp
salmanfarisvp / Raspberry Pi NodeJS Update.md
Last active September 13, 2021 08:05
NodeJS Update on Raspberry Pi

Step 1: Download Latest NodeJS verison:

curl -o node-v14.17.6-linux-armv7l.tar.xz https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-armv7l.tar.xz

Step 2: Extract the files by using the tar command:

tar -xvf node-v14.17.6-linux-armv7l.tar.x

Step 3: sudo cp -r node-v14.17.6-linux-armv7l/* /usr/local/sudo

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
@salmanfarisvp
salmanfarisvp / ReadSMS.ino
Created November 21, 2019 08:39
Read SMS using SIM800L and Print the message content in I2C LCD Display .
#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
String Grsp;
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2
/*
Neo Clock
*/
#include <Adafruit_NeoPixel.h>
#include <TimeLib.h>
#include <Wire.h>
#include <DS1307RTC.h>
@salmanfarisvp
salmanfarisvp / video.sh
Created December 1, 2018 13:52
Raspberry Pi video Looping Script
#!/bin/sh
setterm -cursor off
VIDEOPATH="/home/pi/videoloop/"
SERVICE="omxplayer"
while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
sleep 1;
/*
* Main.c
*
* Created: 3/19/2018 9.11.32 PM
* Author : Salman Faris
*/
#define F_CPU 20000000UL //Clock 20-Mhz
#include <avr/io.h>
Commands Description Type Reply Set/Execute Parameters Examples
AT generic cmd basic OK - - -
AT+RST Resets the mod basic Module info - - AT+RST
AT+GMR returns the current Fw version basic Fw Version - - -
AT+CWMODE Wifi Mode Set Wifi Mode SET AT+CWMODE=<Mode> Mode 1=Sta, 2=AP, 3=both AT+CWMODE=2
AT+CWLAP Lists all available AP Wifi list of AP AT+CWLAP - AT+CWLAP
AT+CWJAP Joins an Access Point Wifi OK AT+CWJAP=<ssid>,<pwd> Your Wifi SSID and Password AT+CWJAP=<test>,<123456789>
AT+CWQAP Quits
@salmanfarisvp
salmanfarisvp / SEBi
Created March 10, 2017 04:50
Smart Electric Waste Bin
#include <Servo.h>
int ir;
Servo myservo;
void setup()
{
ir = A1; //IR Connected to A1