This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Practice AJAX</title> | |
<script type="text/javascript"> | |
function do_ajax() { | |
var req = new XMLHttpRequest(); | |
var result = document.getElementById('result'); | |
req.onreadystatechange = function() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Test image 1: https://imgur.com/ZL9xyBy | |
Test image 2: https://imgur.com/MtHCRrb | |
Test image 3: https://imgur.com/J4ULXO0 | |
Test image 4: https://imgur.com/jHyfTJa | |
@author: Tamojit Saha <https://github.com/TamojitSaha> | |
''' | |
from PIL import Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pin definition | |
#define RST_PIN 2 | |
#define DC_PIN 4 | |
#define CS_PIN 15 | |
#define BUSY_PIN 5 | |
#define SCK_PIN 14 | |
#define SDI_PIN 13 | |
#define SWRESET 0x12 | |
#define ACT_DISPLAY_UPDATE 0x20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
TaskHandle_t Task1, Task2; | |
int count1 = 0, count2 = 0; | |
#define BTN_1 GPIO_NUM_10 | |
#define BTN_2 GPIO_NUM_11 | |
#define LED_1 GPIO_NUM_12 | |
#define LED_2 GPIO_NUM_13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from awscrt import io, mqtt, auth, http | |
from awsiot import mqtt_connection_builder | |
import time as t | |
import json | |
import threading | |
# Define ENDPOINT, CLIENT_ID, PATH_TO_CERT, PATH_TO_KEY, PATH_TO_ROOT, MESSAGE, TOPIC, and RANGE | |
ENDPOINT = "xxxxxxxxxx-ats.iot.us-east-2.amazonaws.com" | |
CLIENT_ID = "testDevice" | |
PATH_TO_CERT = "your_cert.crt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
// Uses https://github.com/PaulStoffregen/TimerOne for sending on a regular interval | |
#include <TimerOne.h> | |
// ECHO pin, needs to be a pin that supports interrupts! | |
#define ULTRASONIC_PIN_INPUT 2 | |
// TRIG pin, can be any output pin | |
#define ULTRASONIC_PIN_OUTPUT 3 | |
// update interval, make sure to keep it above 20ms | |
#define ULTRASONIC_TIMER_US 50000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Update 27 Jun 20 | |
Implemented NRFLite Library for 2pin communication with NRF24L01 | |
Refer to https://github.com/dparson55/NRFLite for more information. | |
@author: Tamojit Saha | |
@website: https://www.tamojitsaha.info | |
*/ | |
#include <avr/sleep.h> // Sleep Modes | |
#include <avr/power.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void merge(int *arr, int l, int m, int r) | |
{ | |
int i, j, k; | |
int n1 = m - l + 1; | |
int n2 = r - m; | |
int L[n1], R[n2]; | |
for (i = 0; i < n1; i++) | |
L[i] = arr[l + i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "color.h" | |
#include "utilities.h" | |
#include <math.h> | |
/* | |
* Algorithm adapted from https://gist.github.com/hdznrrd/656996. Uses a little libmath. | |
* */ | |
void color_HSV2RGB(struct color_ColorHSV const *hsv, struct color_ColorRGB *rgb) { | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int i=1; | |
int main() | |
{ | |
(i) ?: 1; | |
printf("%d",i); | |
return 0; |
NewerOlder