What is loaded / running on the arduino?



  • Just a question that is on my mind for some time now. When a sketch is loaded on a arduino (in my case a pro mini) how to see / find out what is on that board? Or is that even not possible?
    After some time running a node and building others in the mean time it is not always clear what is on the particular node. Dis I miss something basic here? Or is it just not possible getting the (sketch) info from the arduino?
    How are you dealing with it. Having a sketch named/ numbered for every node? Just wondering what is the best practise.


  • Mod

    @mr_sensor you are correct that it is not possible to get the sketch from the Arduino.

    But all MySensors sketches have something like this:

    sendSketchInfo("TemperatureAndHumidity", "1.1");
    

    which identifies which type of sketch and the version of that sketch, every time the sensor is restarted. If you store your sketches in some version control system (git is most popular), keeping track of them becomes quite easy.

    See also https://forum.mysensors.org/topic/2203/method-to-reveal-sketch-inside-node-or-g-w for an earlier discussion on a similar topic.



  • @mfalkvidd said in What is loaded / running on the arduino?:

    @mr_sensor you are correct that it is not possible to get the sketch from the Arduino.

    But all MySensors sketches have something like this:

    sendSketchInfo("TemperatureAndHumidity", "1.1");
    

    which identifies which type of sketch and the version of that sketch, every time the sensor is restarted. If you store your sketches in some version control system (git is most popular), keeping track of them becomes quite easy.

    See also https://forum.mysensors.org/topic/2203/method-to-reveal-sketch-inside-node-or-g-w for an earlier discussion on a similar topic.

    @mfalkvidd thanks for the reply. The sendSketchInfo is indeed helpfull will also read the link.



  • Arduino IDE can only program chip, not read its program memory.
    But you can use AVRDUDE ( maybe with some GUI ) for reading program memory from your chip.
    And in your program sketch define some string to identify version.
    It can be read hex output of program memory then.


Log in to reply
 

Suggested Topics

  • 4
  • 4
  • 3
  • 15
  • 9
  • 2

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts