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
<?php header('Content-Type: text/html; charset=utf-8'); ?> | |
<html> | |
<head> | |
<title>Fix wrong encoded UTF8 characters</title> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
</head> | |
<body> | |
<pre> | |
<?php | |
/* Problem description: |
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
/* | |
Example implementation to receive commands over TCP on your Photon running FastLED animations. | |
FastLED is not implemented you have to do that yourself. | |
It makes use of this Serial cmd protocol concept: | |
https://gist.github.com/kasperkamperman/7e827bb481dfcdb4cb52 | |
See this Processing sketch to send TCP Data. Modify the IPAddress to the local address of the Photon. | |
https://gist.github.com/kasperkamperman/1f185758519fa3131ea0 |
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 "Particle.h" | |
// RM0033 MANUAL - Table 23 / Figure 1 System architecture | |
// Photon is STM32F205 | |
// Only DMA2 is connected with GPIO ports https://stackoverflow.com/questions/46613053/pwm-dma-to-a-whole-gpio | |
// GPIO BSSRL/BSSRH/BSSR http://hertaville.com/stm32f0-gpio-tutorial-part-1.html | |
// DMA_Mode_Circular https://github.com/monkbroc/particle-speaker | |
// Ulrich Radig OctoArtnetNode https://www.ulrichradig.de/home/index.php/dmx/8-kanal-art-net | |
// Thanks to Julien Vanier for the idea of BSRR manipulation. |
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
/* | |
* oscP5sendreceive by andreas schlegel | |
* example shows how to send and receive osc messages. | |
* oscP5 website at http://www.sojamo.de/oscP5 | |
* modified by Kasper Kamperman | |
* OSC explanation video: https://youtu.be/0uOR2idKvrM | |
*/ | |
import oscP5.*; | |
import netP5.*; |
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
/* | |
Face Detection example: | |
- including mirror effect | |
- track the position of the face | |
Install the OpenCV for Processing library (Sketch > Import library): | |
https://github.com/atduskgreg/opencv-processing | |
Check also the reference: | |
http://atduskgreg.github.io/opencv-processing/reference/ |
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
/* script to calibrate (sound level normalizing) a microphone (or other sensor). | |
used with Sound Sensor v2.0 from flamingoeda.com / electronic bricks | |
sampling based on Arduino Cookbook recipe "detecting sound" chapter 6.7 | |
dim_curve idea by Jims <http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1174674545> | |
created 7 september 2011 Kasper Kamperman | |
http://www.kasperkamperman.com | |
This example code is in the public domain. | |
*/ |
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
// ReadPulseCooking.pde | |
import processing.serial.*; | |
/* | |
http://pulsesensor.myshopify.com/ | |
Uses a modified pulse sensor script in Arduino to update each 10ms | |
A different string is formulated with all the data |
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
<pre> | |
<?php | |
ini_set('display_errors', '1'); | |
ini_set('error_reporting', E_ALL); | |
/* This algorithm spreads out reoccurring (every n minutes) api calls over time, so server load | |
is balanced. It's only the spreading out part. | |
The whole system uses a database with 60 columns. Each croncall (if we assume one a minute) we read out the |
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
import org.opencv.core.Mat; | |
import gab.opencv.*; | |
import processing.video.*; | |
Capture video; | |
OpenCV opencv; | |
Mat cvLastFrameMat; | |
Mat cvThisFrameMat; |
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
/* Demo to create a DMX output on every pin of the Photon. | |
It send the information through DMA, so transmitting data won't cost you | |
extra CPU cycles. Counterpart of this method is that each bit occupies 32bits | |
(unt32_t) in memory. So almost half of the Photon's memory is used for the | |
data array. | |
You can choose to use continuousMode is DMX is transmitted on the maximum speed | |
of around 44 fps. You can't go faster (at least not if you use the whole buffer). | |
This code supports on pin, however without any additional memory cost you could |
NewerOlder