Skip to content

Instantly share code, notes, and snippets.

View fxprime's full-sized avatar

ArduinoNa ขายอุปกรณ์ Arduino, เครื่องมือช่าง, raspberry pi, สอน ROS fxprime

View GitHub Profile
@fxprime
fxprime / heat_index_cal.ino
Last active July 21, 2022 15:19
Heat-index from DHT library
/*!
* @brief Converts Celcius to Fahrenheit
* @param c
* value in Celcius
* @return float value in Fahrenheit
*/
float convertCtoF(float c) { return c * 1.8 + 32; }
/*!
@fxprime
fxprime / readme.md
Last active April 17, 2022 08:55
หา PYTHON ไม่เจอใน mac m1

ติดตั้ง Arduino ใน Mac M1

1. โหลด Arduino App

2. ติดตั้ง Python ผ่าน Anaconda ตามวิดิโอข้างล่าง

วิดิโอ

https://www.youtube.com/watch?v=2VECcPofhP8 (แค่ติดตั้ง anaconda ก็พอ)

@fxprime
fxprime / app_httpd.cpp
Created April 17, 2022 06:23
แก้ face detection, enable PSRAM, hugh app, ver 1.0.5
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// 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
// distributed under the License is distributed on an "AS IS" BASIS,
// the regular Adafruit "TouchScreen.h" library only works on AVRs
// different mcufriend shields have Touchscreen on different pins
// and rotation.
// Run the TouchScreen_Calibr_native sketch for calibration of your shield
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft; // hard-wired for UNO shields anyway.
#include <TouchScreen.h>
#include <Arduino.h>
/*
Udp NTP Client
Get the time from a Network Time Protocol (NTP) time server
Demonstrates use of UDP sendPacket and ReceivePacket
For more on NTP time servers and the messages needed to communicate with them,
see http://en.wikipedia.org/wiki/Network_Time_Protocol
/* -------------------------------------------------------------------------- */
/* WS2815 using UNO by Modulemore.com */
/* -------------------------------------------------------------------------- */
/* --------------------------------- Pinout --------------------------------- */
// UNO ---- WS2815
// D2 DI
// GND GND
#include <Arduino.h>
@fxprime
fxprime / hk.c
Created April 26, 2021 16:17 — forked from tobin/hk.c
Hoshen-Kopelman algorithm for cluster labeling
/* Tobin Fricke's implementation of the
Hoshen-Kopelman algorithm for
cluster labeling.
Copyright (c) September 9, 2000, by Tobin Fricke <[email protected]>
Modified 2002-03-09 Tobin Fricke
Modified substantially 2004-04-21 by Tobin Fricke
This program is written in the 1999 standard of the C language (C99). Older C
@fxprime
fxprime / hsv2rgb.ino
Created April 20, 2021 09:39 — forked from postspectacular/hsv2rgb.ino
Super compact HSV/RGB conversions for Arduino/C
int redPin = 6;
int greenPin = 5;
int bluePin = 9;
float col[3];
float hue = 0.0;
void setup() {
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
@fxprime
fxprime / hsvrgb-cpp
Created April 20, 2021 09:20 — forked from fairlight1337/hsvrgb-cpp
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <[email protected]>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
/*************************************************************
* *
* Visual servoing control unit *
* (Manual mode) *
* *
************************************************************/
/* -------------------------------------------------------------------------- */
/* Library */