Home Page Forums Tinylab Test codes for TinyLab

This topic contains 0 replies, has 1 voice, and was last updated by  i.kelly 2 years, 2 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #186

    i.kelly
    Participant

    I have been playing around with some of the example codes listed in https://github.com/sixfab/tinylab. Some of them do not work, for example
    the buzzer sketch has to be changed as follows:

    Lines 26 to 32… The lower case notes c,d,e,f,g,a,b,have to be changed to uppercase
    Line 33…The upper case C can be changed to X
    Line 39…int speakerOut changed to A1
    Line 53…All the lower case letters changed to uppercase and the upper case C changed to X

    The reason for the above is that you cannot define a lower case single letter, so
    #define c 3830 will return an error ” expected ‘, ‘ or ‘…’ before numeric constant” whilst
    #define cc 3830 will be ok.

    The basic digital watch works well but you have to set the time of the RTC, I use the code listed below
    It gets the date and time from the compiler when it was run and configures the RTC with this data.
    The serial monitor shows the data saved to the RTC.
    The code is at https://github.com/PaulStoffregen/DS1307RTC/blob/master/examples/SetTime/SetTime.ino
    Credit to PaulStoffregen for writing this, all the libraries needed can also be found here.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.