Skip to content

Instantly share code, notes, and snippets.

View VincentK16's full-sized avatar
:octocat:
Connect with me

Vincent Kok VincentK16

:octocat:
Connect with me
View GitHub Profile
@VincentK16
VincentK16 / gist:7716910
Created November 30, 2013 09:15
Electric Car
[quote]
[color=#CC6600]int[/color] motorPin1 = 7;
[color=#CC6600]int[/color] motorPin2 = 8;
[color=#CC6600]int[/color] enablePin_1 = 6;
[color=#CC6600]int[/color] motorPin4 = 2;
[color=#CC6600]int[/color] motorPin3 = 4;
[color=#CC6600]int[/color] enablePin_2 =3 ;
[color=#CC6600]int[/color] buzzer = 11;
[color=#CC6600]int[/color] f_b_light = 12 ;
[color=#CC6600]int[/color] state;
int motorPin1 = 7;
int motorPin2 = 8;
int enablePin_1 = 6;
int motorPin4 = 2;
int motorPin3 = 4;
int enablePin_2 =3 ;
int buzzer = 11;
int f_b_light = 12 ;
int state;
int flag=0; //makes sure that the serial only prints once the state
@VincentK16
VincentK16 / NodeMCU_receive_from_Arduino_NANO.ino
Created July 11, 2021 12:24 — forked from ariffinzulkifli/NodeMCU_receive_from_Arduino_NANO.ino
Arduino sketch for NodeMCU to receive incoming data from Arduino NANO using SoftwareSerial library
#include <SoftwareSerial.h>
SoftwareSerial softSerial(D2, D3); // (RX, TX)
SimpleDHT11 dht11(5);
void setup() {
softSerial.begin(9600);
}
@VincentK16
VincentK16 / speech_recognize_demo.py
Last active June 25, 2025 08:18
IBM Watson Assistant integration with the Alpha Mini speech recognizer and text to speech system using the Alpha Mini Python SDK from the available demo code.
# To run this code, make sure:
# 1. Have installed "alphamini" and "ibm-watson" Python modules
# 2. Changes to your IBM Watson Assistant parameters:
# a. API key
# b. Assistant URL
# c. Assistant ID
# 3. Alpha Mini serial number
# Follow through the code below to see where are the changes needed.
@VincentK16
VincentK16 / speech_recognize_actions_demo.py
Last active December 22, 2021 06:16
Alpha Mini with IBM Watson Assistant + Robot Actions
# To run this code, make sure:
# 1. Have installed "alphamini" and "ibm-watson" Python modules
# 2. Changes to your IBM Watson Assistant parameters:
# a. API key
# b. Assistant URL
# c. Assistant ID
# 3. Alpha Mini serial number
# Follow through the code below to see where are the changes needed.
import json
from ibm_watson import AssistantV2
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
authenticator = IAMAuthenticator(
'<replace with your own IBM Watson Assistant API Key>')
assistant = AssistantV2(
version='2020-09-24',
authenticator=authenticator
)