I received a bunch of requests on how to setup Visual Studio Code on MacOS and so I made a tutorial. I’ll show how to install C / C++ and then cover how to get Visual Studio code to work as a great C++ and Arduino platform. Windows users look here.
Here is the link to Visual Studio Code. I also received questions on what Arduino kit I plan on using in my upcoming tutorials so here that is for those that are interested. If you get the Unable to open ‘PIO Home’ error, here is the fix.
If you like videos like this consider donating $1, or simply turn off AdBlocker. Either helps a lot.
helloworld.cpp
1 2 3 4 5 6 |
#include <iostream> int main(){ std::cout << "Hello World" << std::endl; return 0; } |
Arduino main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#include "Arduino.h" void setup() { // initialize LED digital pin as an output. pinMode(LED_BUILTIN, OUTPUT); } void loop() { // turn the LED on (HIGH is the voltage level) digitalWrite(LED_BUILTIN, HIGH); // wait for a second delay(100); // turn the LED off by making the voltage LOW digitalWrite(LED_BUILTIN, LOW); // wait for a second delay(100); } |
Leave a Reply