https://www.youtube.com/watch?v=2VECcPofhP8 (แค่ติดตั้ง anaconda ก็พอ)
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
| /** | |
| * | |
| */ | |
| const int dirPin = 8; | |
| const int stepPin = 9; | |
| const int enablePin = 7; | |
| const int sw = 6; | |
| const int delayMicros = 500; //Delay between each step | |
| const int maximumSteps = 230; |
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 <AccelStepper.h> | |
| const int StepPin = 9; | |
| const int DirPin = 8; | |
| const int EnablePin = 7; | |
| AccelStepper stepper(AccelStepper::DRIVER, StepPin, DirPin, 0, 0, true); |
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
| const int dirPin = 8; | |
| const int stepPin = 9; | |
| const int enablePin = 7; | |
| void setup() { | |
| pinMode(enablePin, OUTPUT); | |
| pinMode(stepPin, OUTPUT); | |
| pinMode(dirPin, OUTPUT); | |
| digitalWrite(enablePin, LOW); |
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
| /** | |
| ตัวอย่างการใช้ PS2 Wireless กับ Arduino | |
| PS2X_lib | |
| ในการอ่านค่า joy PS2 ของร้าน Modulemore | |
| โดยต่อ | |
| UNO R3 --- > PS2 adapter | |
| GND - GND | |
| 5v - VCC | |
| D3 - DAT | |
| D4 - CMD |
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
| /** | |
| * Smart farm simple version | |
| * Control 2 motor with RC remote | |
| * Right horizontal stick control throttle | |
| * Left vertical stick control steering | |
| * Created by : ModuleMore.com | |
| */ | |
| #include <Arduino.h> | |
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
| /* -------------------------------------------------------------------------- */ | |
| /* ModuleMore AM2306 (Modbus) Example code */ | |
| /* -------------------------------------------------------------------------- */ | |
| /* ------------------------------- วิธีการต่อ ------------------------------- */ | |
| /** | |
| * ESP8266 ---> MAX485 ---> AM2306 | |
| * 5V 5V RED | |
| * GND GND BLACK | |
| * - RE (ต่อกับDE) |
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
| /* -------------------------------------------------------------------------- */ | |
| /* ModuleMore AM2306 (Modbus) Example code */ | |
| /* -------------------------------------------------------------------------- */ | |
| /* ------------------------------- วิธีการต่อ ------------------------------- */ | |
| /** | |
| * ESP8266 ---> MAX485 ---> AM2306 | |
| * 5V 5V RED | |
| * GND GND BLACK | |
| * - RE (ต่อกับDE) |
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
| /*! | |
| * @brief Converts Celcius to Fahrenheit | |
| * @param c | |
| * value in Celcius | |
| * @return float value in Fahrenheit | |
| */ | |
| float convertCtoF(float c) { return c * 1.8 + 32; } | |
| /*! |
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
| // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, |