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 "rgb_lcd.h" | |
#define ROTARY_ANGLE_SENSOR A0 | |
#define ADC_REF 5//reference voltage of ADC is 5v.If the Vcc switch on the seeeduino | |
//board switches to 3V3, the ADC_REF should be 3.3 | |
#define GROVE_VCC 5//VCC of the grove interface is normally 5v | |
#define FULL_ANGLE 300//full value of the rotary angle is 300 degrees | |
rgb_lcd lcd; |
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 <Tone.h> | |
#include "Ultrasonic.h" | |
Tone notePlayer; | |
Ultrasonic ultrasonic(7); | |
void setup(void) | |
{ | |
notePlayer.begin(8); | |
} |
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 <stdint.h> | |
#include <SeeedTouchScreen.h> | |
#define YP A2 // must be an analog pin, use "An" notation! | |
#define XM A1 // must be an analog pin, use "An" notation! | |
#define YM 14 // can be a digital pin, this is A0 | |
#define XP 17 // can be a digital pin, this is A3 | |
#define TS_MINX 116*2 | |
#define TS_MAXX 890*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
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <PubSubClient.h> | |
const char* ssid = "****"; | |
const char* wifi_password = "****"; | |
const char* mqtt_server = "****"; | |
const int port = ****; | |
const char* username = "****"; | |
const char* password = "****"; |
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 <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <PubSubClient.h> | |
const char* ssid = "****"; | |
const char* wifi_password = "****"; | |
const char* mqtt_server = "****"; | |
const int port = ****; | |
const char* username = "****"; |
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 <Wire.h> | |
#include <SPI.h> | |
#include <SparkFunLSM9DS1.h> | |
LSM9DS1 imu; | |
#define LSM9DS1_M 0x1E // Would be 0x1C if SDO_M is LOW | |
#define LSM9DS1_AG 0x6B // Would be 0x6A if SDO_AG is LOW | |
#define PRINT_SPEED 250 // 250 ms between prints | |
#include <ESP8266WiFi.h> |
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 <Arduino.h> | |
#include <U8g2lib.h> | |
#ifdef U8X8_HAVE_HW_SPI | |
#include <SPI.h> | |
#endif | |
#ifdef U8X8_HAVE_HW_I2C | |
#include <Wire.h> | |
#endif |
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
[ | |
{ | |
"key": "cmd+down", | |
"command": "editor.action.goToDeclaration", | |
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor" | |
}, | |
{ | |
"key": "cmd+up", | |
"command": "workbench.action.navigateBack" | |
}, |
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
package roman | |
import ( | |
"testing" | |
) | |
func TestToRoman(t *testing.T) { | |
got := ToRoman(1) | |
if got != "I" { | |
t.Errorf("Fail ToRoman(1): want I got %s", got) |
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
package roman | |
func ToRoman(i int) string { | |
return "_" | |
} |