Notes
- Max’s email: [email protected]
- Mainly refer to File Structure guide & Coding Env Setup guide is OK
- Arduino library path → C:\Users\[user]\Documents\Arduino\libraries
- pinMode(pin, mode) → ピンの動作を入力か出力に設定します
- digitalWrite(pin, value) → if (pinMode==OUTPUT), HIGHもしくはLOWにセットすると、GPIOの出力電圧が変化します
- delay (ms) → プログラムを指定した時間だけ止めます止めます。delay関数はビジーウェイトです。処理をOSに戻したい場合は、usleep(ms)を使ってください。
- To change direction, modify direction pin output. To stop, set speed=0
File Structure & Convention for “SpresenseCar_3” March 15, 2023
- Similar for both Spresense & Nucleo64
- General ideas:
- One “main.cpp” file, supplemented by custom-made Library files
- One major header file “including” of ALL the other headers needed for the program, including Library and Student files, thus, use of header files is strongly encouraged
- Every user should create his/her own folder in “StudentCodes/”, and put his/her own files inside
- Each user should also create one main header file for “including” all his/her self-made header files, and include that main header file in the “StudentCodes_IncludeLists.h”, such that his/her codes will be included and connected to the rest of the system
- Each user should use namespace to seperate your own code with the rest of the system
- Each user-made file should have the name of its maker in it, so that others can trace back to him/her easily
- File structure
- Notes:
- Refer to my folder (StudentCodes/Max2022) as example of how to do the file structure thing
- Stuff in “LibraryCodes/” is not expected to change, but you will probably want to change it at some point
- Please remember and revert your changes after you do so
- Or push to different branch
- Or make it a different version of the system (eg. SpresenseCar_3.1)
- The use of “#define”, “#define” stuff is global and will pass through namespace
- Use “static const [type] [var_name]” instead please
- Or use macro check (#ifdef [macro]) to limit the visibility/scope of the constant
- Or make it a class object
- In VS Code, PlatformIO uses “.cpp” and not “.ino”, although no difference in programming
Coding Environment (Git, VS Code, Mbed Studio) Setup March 14, 2023
- Guide to setup all the environment & software needed for coding for the Spresense Cars
- Steps (27 steps in total)