Skip to content

Instantly share code, notes, and snippets.

Jens Chr Brynildsen jenschr

Block or report user

Report or block jenschr

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 DS18S20.ino
#include <OneWire.h>
int DS18S20_Pin = 2; //DS18S20 Signal pin on digital 2
//Temperature chip i/o
OneWire ds(DS18S20_Pin); // on digital pin 2
void setup(void) {
Serial.begin(9600);
}
@jenschr
jenschr / apa102.cpp
Last active Jan 5, 2019
APA102 on STM32F070F6
View apa102.cpp
/*
* Simplified code for running APA-102 on STM32
* (or most any other platform by replacing the
* sendRaw-method with platform SPI calls)
*/
#define NUMBER_OF_LEDS 46 // Define number of LEDs in the chain
#define COLORS_PER_LED 3 // Define number of colors we store
const int bufferLength = NUMBER_OF_LEDS*3;
View blink_stm32f0.c
View Feather-Lorawan_m0.ino
/*******************************************************************************
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
* Copyright (c) 2018 Terry Moore, MCCI
*
* Permission is hereby granted, free of charge, to anyone
* obtaining a copy of this document and accompanying files,
* to do whatever they want with them without any restriction,
* including, but not limited to, copying, modification and redistribution.
* NO WARRANTY OF ANY KIND IS PROVIDED.
*
@jenschr
jenschr / HC06_change_name.ino
Created Nov 9, 2018
Simple code snippet to test BT serial + change the name of your HC-06 BT module
View HC06_change_name.ino
// Open Serial Monitor after uploading and make sure it's set to 57600baud
// Check that you get "OK" in the serial monitor after "BT ready?"
// Remember to turn on CR + Newline nat the bottom of the Serial Monitor
// Type in "AT+NAME:yourName" in input-field of your Serial monitor
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
@jenschr
jenschr / MAX30102.cpp
Created Nov 2, 2018
Simple (incomplete) example of how to detect beats from data given by a MAX30102 sensor
View MAX30102.cpp
unsigned long sensorValue = particleSensor.getIR();
if ( sensorValue > 50000)
{
if ( usePlotter )
{
Serial.println(sensorValue); //Send raw data to plotter
} else {
int diff = lastSensorValue - sensorValue;
if ( diff > 80 ) // we may have a beat!
{
View SerialMonitor.ino
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
/* send everything received from the hardware uart to usb serial & vv */
if (Serial.available() > 0) {
View bildr_accelerormeter.ino
//////////////////////////////////////////////////////////////////
//©2011 bildr
//Released under the MIT License – Please reuse change and share
//Simple code for the ADXL335, prints calculated orientation via serial
//////////////////////////////////////////////////////////////////
//Analog read pins
const int xPin = 0;
const int yPin = 1;
const int zPin = 2;
@jenschr
jenschr / StarterForOrion.ino
Created Sep 30, 2018
Makeblock default software for Starter Kit with Orion card
View StarterForOrion.ino
/*************************************************************************
* File Name :starter_factory_firmware.ino
* Author : Ander, Mark Yan
* Updated : Ander, Mark Yan
* Version : V0a.01.007
* Date : 21/06/2017
* Description : Firmware for Makeblock Electronic modules with Scratch.
* License : CC-BY-SA 3.0
* Copyright (C) 2013 - 2016 Maker Works Technology Co., Ltd. All right reserved.
* http://www.makeblock.cc/
@jenschr
jenschr / StarterForBaseBoard.ino
Created Sep 30, 2018
Makeblock default software for Starter Kit with BaseBoard 1.1
View StarterForBaseBoard.ino
/* September 2018
*
* The default Makeblock firmware does not work for Baseboard's
* (as can be seen from countless unanswered threads on the Makeblock forums)
* This firmware has the following tiny changes that make it work:
* - #include <MeOrion.h> is changed to #include <MeBaseBoard.h>
* - int starter_mode = 0; is changed to int starter_mode = 1;
* With these changes, the standard software will work as it should.
*/
You can’t perform that action at this time.