This file contains hidden or 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 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 | |
) |
This file contains hidden or 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
# 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. |
This file contains hidden or 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
# 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. |
This file contains hidden or 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 <SoftwareSerial.h> | |
SoftwareSerial softSerial(D2, D3); // (RX, TX) | |
SimpleDHT11 dht11(5); | |
void setup() { | |
softSerial.begin(9600); | |
} |
This file contains hidden or 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
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 |
This file contains hidden or 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
[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; |
This file contains hidden or 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
int led = A0; | |
int speaker = 13; | |
int button_1 = 0; | |
int button_2 = 1; | |
int button_3=2; | |
int button_4 = 3; | |
int button_5 = 4; | |
int button_6=5; | |
int button_7=6; | |
int button_8=7; |
This file contains hidden or 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
int speaker = 13; | |
int button_1 = 0; | |
int button_2 = 1; | |
int button_3=2; | |
int button_4 = 3; | |
int button_5 = 4; | |
int button_6=5; | |
int button_7=6; | |
int button_8=7; | |
int button_9=8; |
This file contains hidden or 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 <LiquidCrystal.h> | |
int reading = 0; | |
int sensorPin = A0; | |
int relay =7; | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
void setup() { | |
// set up the LCD's number of columns and rows: | |
lcd.begin(16, 2); |
NewerOlder