Understanding the Arduino Sketchbook: Opening and Saving Arduino Sketches

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ค. 2024
  • 🤩 How much Arduino can you learn in 7 Days? 👇
    bit.ly/7_Day_Arduino_Challenge
    **If you like this, I think you'll like the premium Arduino training we offer. Check it out here** bit.ly/3nSBPUs
    Click Below to Read About This Topic on Our Website
    programmingelectronics.com/un...
    Description:
    Understanding how the Arduino IDE sets up its file directory system can spare you some confusion when it comes to saving, organizing and opening your Arduino sketches (or sketches you have downloaded from the internet).
    This week’s episode covers the following:
    1. The Arduino IDE Sketchbook folder
    2. How to change the default location where your Arduino sketches get saved
    3. What happens when an Arduino file does not have an enclosing sketch folder of the same name
    4. Where and how multiple tabs get saved in an Arduino sketch
    5. Why the pancreas of a woodchuck is better suited than our own
    The Sketchbook Folder and Changing the Default Save Location
    The default location where Arduino sketches you write will be saved is called the Sketchbook.
    The Sketchbook is simply a folder on your computer like any other. It acts as a handy repository for sketches and is also where add-on code libraries get saved.
    ...
    If you want to change this default location, you click the Browse button next to the file directory path and choose a different place. Pretty simple.
    Sketch Folders
    If you go into your file directory system and open up the Sketchbook folder (again, named “Arduino” by default), you may see a bunch of folders that you didn’t make.
    This is because every Arduino file must be inside a folder that has the same name as the file (there are some exceptions to this that we'll talk about in the moment).
    When I write a new sketch and save it, the Arduino IDE automatically creates a new folder that has the exact same name as the sketch itself. The Arduino file (which has the extension .ino) is placed inside this enclosing folder, which is called a sketch folder.
    ...
    If you open a .ino file that is not inside an enclosing sketch folder of the exact same name then you will get a pop-up from the Arduino IDE that says:
    “The file “sketch_name.ino” needs to be inside a sketch folder named “sketch_name”. Create this folder, move the file, and continue?”
    Read More...
    programmingelectronics.com/un...
    About Us:
    This Arduino tutorial was created by _pea. We are an education company who seek to help people learn about electronics and programming through the ubiquitous Arduino development board.
    Have an awesome day!

ความคิดเห็น • 39

  • @programmingelectronics
    @programmingelectronics  3 ปีที่แล้ว +1

    ****If you like this, I think you'll like the premium Arduino training we offer. You can check it out here**** bit.ly/3lHyzcB

  • @g7mks383
    @g7mks383 10 หลายเดือนก่อน +1

    Thank you so much I have been going crazy trying to understand the file/Sketch saving. Now a lot clearer.

  • @bobharrison9620
    @bobharrison9620 2 ปีที่แล้ว +1

    very fast for a new old dude but very well done and explained where my files went.. thank you

  • @rhbruning
    @rhbruning 6 ปีที่แล้ว +1

    Wow. Thank you. Simple and arbitrary. Throw out all you ever knew about folders, save as or organizing your own projects.

  • @craigmelvin4889
    @craigmelvin4889 3 ปีที่แล้ว +1

    Very useful info that I used today in 2021

  • @allyourcode
    @allyourcode 8 ปีที่แล้ว +3

    Yes! This very much clarified how the Arduino organizes files. Thank you!

  • @3flyingkitty3
    @3flyingkitty3 3 ปีที่แล้ว +1

    Thank you! I need to organize my sketches

  • @3gypt1an
    @3gypt1an 6 ปีที่แล้ว

    Very well presented. Thank you!

  • @rparkhouse
    @rparkhouse 7 ปีที่แล้ว

    Thank you very much for that explanation!

  • @floodo1
    @floodo1 6 ปีที่แล้ว +1

    very helpful, thanks

  • @gajananphadte3440
    @gajananphadte3440 7 ปีที่แล้ว +1

    Puzzle solved. Thank you.

  • @3flyingkitty3
    @3flyingkitty3 2 ปีที่แล้ว +1

    This really helps

  • @vishalmayannache5389
    @vishalmayannache5389 5 ปีที่แล้ว +1

    Nice video sir

  • @charlesgoehring3445
    @charlesgoehring3445 3 ปีที่แล้ว

    Thanks for the info. None of their file system operations work as expected.

  • @freddiemortos8519
    @freddiemortos8519 9 ปีที่แล้ว

    Nice. How about changing the folder where the generated Hex file will be save? Because it is buried deep into the drive C,temporary folder. It's not so easy to locate the hex file.

  • @anokhautomation4453
    @anokhautomation4453 3 ปีที่แล้ว

    Desr sir. Is there is any possible way we can seethe code uploaded in arduino board or any other micro controller???

  • @kirkd6285
    @kirkd6285 5 ปีที่แล้ว

    I have been looking all over for some answer to a question on this subject with no luck.. It pertains to Marlin software for 3d printers but seems like an arduino sketch question. Its seems like i can rename sketches ie. Marlin4 and the code can nolonger compile. Is that impossible? Should I add another folder of depth? Like \marlin4\marlin\marlin.ino?

  • @simcha007
    @simcha007 6 ปีที่แล้ว

    Is it possible to use another file location for my sketchbook files?
    See: file - preferences - sketchbook location.
    In my opinion I can choose there my own file location, other than the default c:/user/documents/Arduino.
    But if I do, I get the message: "Compile failure for board Nano".
    So what is the use to have the possiblity to change the Sketchbook location preference?

  • @iceman1st1
    @iceman1st1 2 ปีที่แล้ว

    I've installed the IDE on a different drive, but when I download libraries from the library manager it creates another folder called libraries in the libraries folder.
    this is how it is: D:\Program Files (x86)\Arduino\libraries\libraries

  • @jerryrichard4994
    @jerryrichard4994 5 ปีที่แล้ว

    I'm having trouble putting this code unto my sketch Forward_Reverse_Serial_8ch it will not upload in my Arduino What is proper way to upload this code? thank you

  • @ZookeeperJohnG
    @ZookeeperJohnG 4 ปีที่แล้ว +1

    OMG Thank you! There is hope LOL ;)

  • @andreamitchell4758
    @andreamitchell4758 6 ปีที่แล้ว

    i don't understand what the purpose of the associated .ino in the same sketch folder is
    i mean you can only upload one right? you can't upload both at the same time can you?
    also i find it very annoying how every time you open something it opens another window
    why doesn't it just open it in the window that is already open? why does it have to bring it up again ,or why not just open it in a new tab like a browser?

  • @allyourcode
    @allyourcode 8 ปีที่แล้ว

    TLDR: A sketchbook is a folder that contains "sketches". A sketch is also a folder, but it contains a .ino file, which contains the actual code. Very important note about naming: if the sketch folder is named MyWonderfulSketch, then the file in that folder must be named MyWonderfulSketch.ino. It isn't a sketch, unless you follow this naming rule!

  • @ajexjohnson3873
    @ajexjohnson3873 5 ปีที่แล้ว

    Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Micro"
    C:\Users\Igot_mail\Documents\Arduino\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino:7:20: fatal error: Keypad.h: No such file or directory
    #include
    ^
    compilation terminated.
    exit status 1
    Error compiling for board Arduino/Genuino Micro.
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    how do i fix this!

  • @OnlyKnowsGod
    @OnlyKnowsGod 9 ปีที่แล้ว

    if you want to answer a question thats confusing the arduino community. here it is:- why does the ide flag an error when uploading a sketch into an arduino located insitue withing a pcb..
    its ok to upload when not in a pcb but mounting into a pcb brings problems when subcequently trying to upload sketches.. ideas why and how to fix.

  • @mortal4life173
    @mortal4life173 8 ปีที่แล้ว

    I think he is using some kind a recording script in the video bro.

  • @georgehoskins1228
    @georgehoskins1228 3 ปีที่แล้ว +1

    Thank you!!! From an old fart who couldn't wrap his technically challenged brain around this even after watching many other videos

  • @Popart-xh2fd
    @Popart-xh2fd 8 ปีที่แล้ว

    "You forgot your Sketchbook" "Arduino cannot run because it could not create a folder to store your sketchbook" Oh-Oh, It looks like Arduino is also having problems with the Sketchbook...!

    • @Popart-xh2fd
      @Popart-xh2fd 8 ปีที่แล้ว

      +Popart 2015 Found the problem, the link Documents to the folder where sketchbook is saved was pointing to an unexisting folder in my Windows 8! Just correct the link to the correct (in this case default) folder and done, problem solved.

  • @mortal4life173
    @mortal4life173 8 ปีที่แล้ว

    great video bro, how can I program Arduino Nano to record fighting game special moves combos inputs then play it back with a press of a button to play back in the same fighting game. like what this guy did in this video here is the link. th-cam.com/video/uXvHTJOQdkQ/w-d-xo.html