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 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
#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
# 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
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 | |
) |
OlderNewer