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
////////////////////////////////////////////////////////////////// | |
//©2011 bildr | |
//Released under the MIT License – Please reuse change and share | |
//Simple code to output a PWM sine wave signal on pin 9 | |
////////////////////////////////////////////////////////////////// | |
#define fadePin 9 | |
void setup(){ | |
pinMode(fadePin, OUTPUT); |
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
/* | |
* Shift register code from | |
* http://bildr.org/2011/02/74hc595/ | |
*/ | |
int SER_Pin = 8; //pin 14 on the 75HC595 | |
int RCLK_Pin = 9; //pin 12 on the 75HC595 | |
int SRCLK_Pin = 10; //pin 11 on the 75HC595 | |
//How many of the shift registers – change this |
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
/* 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. | |
*/ |
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
/************************************************************************* | |
* 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/ |
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
////////////////////////////////////////////////////////////////// | |
//©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; |
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
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) { |
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
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! | |
{ |
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
// 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); |
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
/******************************************************************************* | |
* 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. | |
* |
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
/** | |
**=========================================================================== | |
** Notes during development of this tiny Blink program | |
** - Blinking a LED isn't easy unless you know exactly what libraries you | |
** need to include & what registers to set. The simplest way is to try | |
** setting as much as possible up using CubeMX. This will add all the | |
** needed HAL files for GPIO | |
** - You need to learn how to clear breakpoints since Atollic TrueStudio will | |
** place them in random parts of your code at times. This will case debug | |
** to stop working. If you get this error: |