Skip to content

Instantly share code, notes, and snippets.

Anuchit Chalothorn anoochit

Block or report user

Report or block anoochit

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
View devstack-cheat-sheet.txt
sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su - stack
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
@anoochit
anoochit / Dockerfile
Created Jun 15, 2019
deviceQuery Dockerfile for container app in NVIDIA Jetson Nano
View Dockerfile
FROM arm64v8/ubuntu
ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/tegra
RUN mkdir /cudaSamples
COPY deviceQuery /cudaSamples/
CMD /cudaSamples/deviceQuery
@anoochit
anoochit / run_keras_server.py
Created Jun 15, 2019
Keras ResNet50 REST API + Tensorflow for NVIDIA Jetson Nano
View run_keras_server.py
# USAGE
# Start the server:
# python run_keras_server.py
# Submit a request via cURL:
# curl -X POST -F image=@dog.jpg 'http://localhost:5000/predict'
# Submita a request via Python:
# python simple_request.py
# import the necessary packages
#from keras.applications import VGG16
View docker-cuda.sh
docker run --device=/dev/nvhost-ctrl --device=/dev/nvhost-ctrl-gpu --device=/dev/nvhost-prof-gpu --device=/dev/nvmap --device=/dev/nvhost-gpu --device=/dev/nvhost-as-gpu -v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra
@anoochit
anoochit / HID_mouse.ino
Last active May 15, 2019 — forked from chegewara/HID_mouse.ino
ESP32 arduino library with new HID class
View HID_mouse.ino
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include "BLE2902.h"
#include "BLEHIDDevice.h"
#include "HIDTypes.h"
#include <driver/adc.h>
static BLEHIDDevice* hid;
@anoochit
anoochit / pms7003.ino
Last active Mar 2, 2019
pms7003 with ESP32 hardware serial
View pms7003.ino
#include "PMS.h"
HardwareSerial SerialPMS(1);
PMS pms(SerialPMS);
PMS::DATA data;
#define RXD2 23
#define TXD2 22
// ESP32 --> Pantower PMS7003
@anoochit
anoochit / test.txt
Last active Feb 5, 2019
geolocation - position solution at PRB0006
View test.txt
2019/02/05 16:13:00.200 13.901231954 100.546424413 -12.6983 2 6 0.1735 0.0691 0.2131 0.0554 -0.0647 -0.1793 1.18 1.7
2019/02/05 16:13:00.400 13.901231902 100.546424176 -12.6944 2 6 0.1730 0.0689 0.2124 0.0555 -0.0648 -0.1787 0.38 1.4
2019/02/05 16:13:00.600 13.901231753 100.546423973 -12.6671 2 6 0.1726 0.0687 0.2119 0.0556 -0.0650 -0.1782 0.58 1.1
2019/02/05 16:13:00.800 13.901231703 100.546423839 -12.6307 2 6 0.1721 0.0686 0.2114 0.0557 -0.0651 -0.1777 0.78 1.3
2019/02/05 16:13:01.000 13.901231773 100.546423511 -12.6089 2 6 0.1717 0.0684 0.2109 0.0559 -0.0652 -0.1772 0.98 1.9
2019/02/05 16:13:01.200 13.901231858 100.546423358 -12.6170 2 6 0.1713 0.0683 0.2104 0.0560 -0.0654 -0.1768 1.18 2.8
2019/02/05 16:13:01.400 13.901233822 100.546423519 -12.7763 1 6 0.0285 0.0123 0.0358 0.0096 -0.0133 -0.0274 0.38 3.3
2019/02/05 16:13:01.600 13.90123206
@anoochit
anoochit / tello-accelerometer-control.ino
Created Jan 1, 2019
control tello with accelerometer
View tello-accelerometer-control.ino
#include <Wire.h>
#include <SPI.h>
#include <SparkFunLSM9DS1.h>
#include <WiFi.h>
#include <WiFiUdp.h>
// Use the LSM9DS1 class to create an object.
LSM9DS1 imu;
// SDO_XM and SDO_G are both pulled high, so our addresses are:
View esp32-ble-uart.ino
/*
Video: https://www.youtube.com/watch?v=oCMOYS71NIU
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
Ported to Arduino ESP32 by Evandro Copercini
Create a BLE server that, once we receive a connection, will send periodic notifications.
The service advertises itself as: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
Has a characteristic of: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E - used for receiving data with "WRITE"
Has a characteristic of: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E - used to send data with "NOTIFY"
@anoochit
anoochit / tello-udp.ino
Last active Dec 2, 2018
esp32 udp client control DJI Tello
View tello-udp.ino
#include <WiFi.h>
#include <WiFiUdp.h>
// WiFi network name and password:
const char * networkName = "TELLO-C569FC";
const char * networkPswd = "";
//IP address to send UDP data to:
// either use the ip address of the server or
// a network broadcast address
You can’t perform that action at this time.