Skip to content

Instantly share code, notes, and snippets.

Sankar sankarcheppali

Block or report user

Report or block sankarcheppali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sankarcheppali
sankarcheppali / nodemcu_serial_mqtt_publish.ino
Created Apr 13, 2018
read UART data and send messages to MQTT broker
View nodemcu_serial_mqtt_publish.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
// Update these with values suitable for your network.
const char* ssid = "SSID";
const char* password = "password";
const char* mqtt_server = "iot.eclipse.org";
#define mqtt_port 1883
#define MQTT_USER "mqtt username"
@sankarcheppali
sankarcheppali / arduino_nodemcu_mqtt_serial_bridge.ino
Last active Jan 28, 2018
arduino code for nodemcu/esp8266 for connecting to mqtt broker. It can receive and send messages to MQTT broker
View arduino_nodemcu_mqtt_serial_bridge.ino
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
// Update these with values suitable for your network.
const char* ssid = "SSID";
const char* password = "passowrd";
const char* mqtt_server = "iot.eclipse.org";
#define mqtt_port 1883
#define MQTT_USER "username"
@sankarcheppali
sankarcheppali / esp32_serial_mqtt_publish.ino
Last active Dec 9, 2017
Interfacing arduino uno with ESP32
View esp32_serial_mqtt_publish.ino
#include <WiFi.h>
#include <PubSubClient.h>
// Update these with values suitable for your network.
const char* ssid = "SSID";
const char* password = "password";
const char* mqtt_server = "iot.eclipse.org";
#define mqtt_port 1883
#define MQTT_USER "mqtt username"
@sankarcheppali
sankarcheppali / esp32_mqtt_led_on_off.ino
Last active Mar 1, 2018
control leds using ESP32 and MQTT
View esp32_mqtt_led_on_off.ino
#include <WiFi.h>
#include <PubSubClient.h>
#include <ArduinoJson.h>
// Update these with values suitable for your network.
const char* ssid = "SSID";
const char* password = "PASSWORD";
const char* mqtt_server = "iot.eclipse.org";
#define mqtt_port 1883
#define MQTT_USER "username"
@sankarcheppali
sankarcheppali / esp32_serial_mqtt_pub_sub.ino
Last active Sep 22, 2018
esp32 will publish message received from serial line to mqtt broker, writes messages received from mqtt broker to serial line
View esp32_serial_mqtt_pub_sub.ino
#include <WiFi.h>
#include <PubSubClient.h>
// Update these with values suitable for your network.
const char* ssid = "SSID";
const char* password = "pwd";
const char* mqtt_server = "iot.eclipse.org";
#define mqtt_port 1883
#define MQTT_USER "username"
@sankarcheppali
sankarcheppali / uno_send_a0_on_serial.ino
Created Dec 7, 2017
reads A0 pin data ,prepares a JSON and sends on serial line every 5 seconds
View uno_send_a0_on_serial.ino
int id=99;
#include <SoftwareSerial.h>
SoftwareSerial sw(2, 3); // RX, TX
void setup() {
Serial.begin(115200);
Serial.println("Interfacfing arduino with nodemcu");
sw.begin(115200);
}
@sankarcheppali
sankarcheppali / CustomAdapter.java
Created Nov 14, 2017
Text view On click : Show list view : On click item : show selected item in TextView
View CustomAdapter.java
package com.anhure.test3.test3android;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
@sankarcheppali
sankarcheppali / itc_queues.c
Created Aug 25, 2017
inter task communication using queues
View itc_queues.c
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
QueueHandle_t q=NULL;
void consumer_task(void *pvParameter)
{
unsigned long counter;
View blinking_led.c
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
void blink_task(void *pvParameter)
{
//GPIO_NUM_16 is G16 on board
gpio_set_direction(GPIO_NUM_16,GPIO_MODE_OUTPUT);
@sankarcheppali
sankarcheppali / AndroidManifest.xml
Created Jul 1, 2017
Android Connecting WiFi programmatically
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="example.siva.com.hellokotlin">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">
</uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE">
</uses-permission>
<application
You can’t perform that action at this time.