如何将'Blynk Code with NodeMCU'转换为'Blynk Code with ArduinoUno'
How to convert 'Blynk Code with NodeMCU' to 'Blynk Code with ArduinoUno'
我会寻求你的帮助。 下面的代码是在NodeMCU上运行的源代码的一部分。
#define DHTPIN 12 //temp&humi sensor pin setting, GPIO12, D6
#define M1 5 //motor pin setting, GPIO5, D1
#define M2 4 //motor pin setting, GPIO4, D2
我知道NodeMCU的引脚D6就像GPIO12。 D1,D2与GPIO5和GPIO4进行了比较。 但NodeMCU就是这种情况。那么当这个图配置为ArduinoUNO时,是否需要更改 #define 行中的数字?如果是这样,我们如何改变它?我需要答案。
谢谢。我学到了很多东西。
arduino uno 具有 0-13 的 GPIO 引脚,其中一些标记为 PWM,例如 5,6。如果要控制电机的速度,则必须使用这些引脚。要更改引脚,只需更改数字,例如
#define M1 5
#define M2 6
对于DHT,任何引脚都可以。
因此,简而言之,您可以毫无问题地使用这些行。
相关文章:
- "throw expression code" 1e7 >返回 d 是什么?投掷标准::overflow_error( "too big" ) : d;意味 着?
- Visual Studio Code - C++ Debugger 無法啟動
- "Unable to start debugging. No process is associated with this object." - 在Visual Studio Code中使用GDB
- "Program ended with exit code: 0"出现在我的输出的开头?
- 在 R 中调用"multi file C++ code with external libraries referenced"
- 如何将'Blynk Code with NodeMCU'转换为'Blynk Code with ArduinoUno'
- C++链接器错误 ( "Linker command failed with exit code 1" )
- Visual Studio Code build with MsBuild
- 创建类对象时,我得到"error: linker command failed with exit code 1"
- Xcode C++错误"linker command failed with exit code 1"
- C++ SDL "Native' has exited with code -1073741701 (0xc000007b)"
- C++ 在 Code::Blocks 中使用 Gdiplus with MinGW 编译器
- std::vector to java.util.Vector code generation with swig
- Netbeans 8.0.2 返回"During startup program exited with code 0xc0000135"
- C++ QT libXL 错误:"During Startup program exited with code 0xc0000135"
- CPPCHECK 查找宏的查找"redundant code: found a statement that begins with numeric constant"
- 为什么 gdb 总是给"Program exited with code 01"?
- 视觉工作室 - VS2013, C++: 未知"thread X exited with code 0"
- CPPCHECK 报告"Redundant code: Found a statement that begins with numeric constant" 'using'声明
- 谷歌模拟的EXPECT_CALL导致"unknown file:error: SEH exception with code 0xc0000005 thrown in the test body"