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
@salmanfarisvp
salmanfarisvp / DHT.ino
Created January 6, 2017 17:19
Arduino Compatable Temprature and Humidit Sensor Based on DHT11/22
#include <DHT.h>;
//Constants
#define DHTPIN A1 // what pin we're connected to
#define DHTTYPE DHT11 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino
//Variables
int chk;
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software< /span>
@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
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
/*
* Main.c
*
* Created: 3/19/2018 9.11.32 PM
* Author : Salman Faris
*/
#define F_CPU 20000000UL //Clock 20-Mhz
#include <avr/io.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;
/*
Neo Clock
*/
#include <Adafruit_NeoPixel.h>
#include <TimeLib.h>
#include <Wire.h>
#include <DS1307RTC.h>
@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
# 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 / 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