none
HOW TO MAKE A "REALTIME" ALARM CLOCK (4 DIGIT 7 SEGMENT) DESKTOP GADGET IN SMALLBASIC GRAPHICWINDOW RRS feed

  • Question

  • 7 SEGMENT

    ------

    LDGraphicsWindow.TransparentGW()
    GraphicsWindow.CanResize = "false"

    gww = 200
    gwh = 100



    GraphicsWindow.Width = gww
    GraphicsWindow.Height =gwh
    GraphicsWindow.Left = (Desktop.Width)  - (GraphicsWindow.Width)
    GraphicsWindow.Top =  0
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.BrushColor = "#00ff00"
    GraphicsWindow.FontName = "Digital-7 Mono"




    Timer.Interval = 1000
    Timer.Tick = start


    Sub start
      
      x=30  '         clock  x
      y=30  '         clock  y
      
      
      GraphicsWindow.Clear()
      GraphicsWindow.FontSize = 40

      If Clock.Hour > 12 Then
        hour = Clock.Hour-12
        ampm = "PM"
      Else
        hour = Clock.Hour
        ampm = "AM"
      EndIf




    EndSub



    • Edited by msdn.yogesh Friday, August 26, 2016 6:05 AM in complete code
    Thursday, August 25, 2016 1:32 AM

Answers

  • Hello msdn.yogesh,

    This is for your information:

    I found my segment LED viewer RCH738.

    Screen shot of a program Floating-point viewer with segment LED


    Nonki Takahashi

    • Proposed as answer by litdevModerator Friday, August 26, 2016 6:27 PM
    • Marked as answer by msdn.yogesh Friday, August 26, 2016 6:37 PM
    Friday, August 26, 2016 6:24 PM
    Moderator
  • Hi Yogesh:)

    i took your code you have done so far, and insert in somes SHAPES statement, and i put some un-necessary lines to comment in italic

    here it is:

    ___________________________________________________________________________________

    'LDGraphicsWindow.TransparentGW()
    'GraphicsWindow.CanResize = "false"
    gww = 400
    gwh = 200
    GraphicsWindow.Width = gww
    GraphicsWindow.Height =gwh
    GraphicsWindow.Left = 0
    GraphicsWindow.Top =  0
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.BrushColor = "lightgray"
    'GraphicsWindow.FontName = "Digital-7 Mono"
    GraphicsWindow.FontName = "calibri"
     GraphicsWindow.FontSize = 50
    time_text = Shapes.AddText("")
    Shapes.Move(time_text,100,75)
    Timer.Interval = 1000
    Timer.Tick = start

    Sub start
      x=30  '         clock  x
      y=30  '         clock  y

     ' GraphicsWindow.Clear()
      If Clock.Hour > 12 Then
        hour = Clock.Hour-12
        ampm = "PM"
      Else
        hour = Clock.Hour
        ampm = "AM"
      EndIf
     
      Tm = Clock.Time
       Shapes.SetText(time_text,Tm+" "+ampm)
    EndSub

    ___________________________________________________________________________________



    • Edited by YLedEditor Saturday, August 27, 2016 1:03 AM
    • Marked as answer by msdn.yogesh Saturday, August 27, 2016 1:54 AM
    Saturday, August 27, 2016 12:59 AM
    Answerer

All replies

  • Did you try something already?  Show us you what you have, and what problems did you encounter.

    We don't write complete programs for you


    Jan [ WhTurner ] The Netherlands

    Thursday, August 25, 2016 1:24 PM
    Answerer
  • Yes , hi Yogesh !

    post here what you have try so far, there is many experts here, will explain to you the right way to build your program,  but we must see something to give some clues !

    Thursday, August 25, 2016 1:55 PM
    Answerer
  • '   this is my incomplete code

    LDGraphicsWindow.TransparentGW()
    GraphicsWindow.CanResize = "false"

    gww = 200
    gwh = 100



    GraphicsWindow.Width = gww
    GraphicsWindow.Height =gwh
    GraphicsWindow.Left = (Desktop.Width)  - (GraphicsWindow.Width)
    GraphicsWindow.Top =  0
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.BrushColor = "#00ff00"
    GraphicsWindow.FontName = "Digital-7 Mono"




    Timer.Interval = 1000
    Timer.Tick = start


    Sub start

      x=30  '         clock  x
      y=30  '         clock  y


      GraphicsWindow.Clear()
      GraphicsWindow.FontSize = 40

      If Clock.Hour > 12 Then
        hour = Clock.Hour-12
        ampm = "PM"
      Else
        hour = Clock.Hour
        ampm = "AM"
      EndIf




    EndSub

          
    Friday, August 26, 2016 6:07 AM
  • '   this is my incomplete code

    LDGraphicsWindow.TransparentGW()
    GraphicsWindow.CanResize = "false"

    gww = 200
    gwh = 100



    GraphicsWindow.Width = gww
    GraphicsWindow.Height =gwh
    GraphicsWindow.Left = (Desktop.Width)  - (GraphicsWindow.Width)
    GraphicsWindow.Top =  0
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.BrushColor = "#00ff00"
    GraphicsWindow.FontName = "Digital-7 Mono"




    Timer.Interval = 1000
    Timer.Tick = start


    Sub start

      x=30  '         clock  x
      y=30  '         clock  y


      GraphicsWindow.Clear()
      GraphicsWindow.FontSize = 40

      If Clock.Hour > 12 Then
        hour = Clock.Hour-12
        ampm = "PM"
      Else
        hour = Clock.Hour
        ampm = "AM"
      EndIf




    EndSub

          
    Friday, August 26, 2016 6:08 AM
  • You should look in the forum through a search like eg. Alarm Clock (will show a lot of solutions) or the SB Program Gallery

    For a good looking digital font, you can try a search for eg. 'Digital Readout'  font.


    Friday, August 26, 2016 11:50 AM
    Answerer
  • Hello msdn.yogesh,

    This is for your information:

    I found my segment LED viewer RCH738.

    Screen shot of a program Floating-point viewer with segment LED


    Nonki Takahashi

    • Proposed as answer by litdevModerator Friday, August 26, 2016 6:27 PM
    • Marked as answer by msdn.yogesh Friday, August 26, 2016 6:37 PM
    Friday, August 26, 2016 6:24 PM
    Moderator
  • helpful :)

    thank you   Nonki Takahashi

    Friday, August 26, 2016 6:36 PM
  • Hi Yogesh:)

    i took your code you have done so far, and insert in somes SHAPES statement, and i put some un-necessary lines to comment in italic

    here it is:

    ___________________________________________________________________________________

    'LDGraphicsWindow.TransparentGW()
    'GraphicsWindow.CanResize = "false"
    gww = 400
    gwh = 200
    GraphicsWindow.Width = gww
    GraphicsWindow.Height =gwh
    GraphicsWindow.Left = 0
    GraphicsWindow.Top =  0
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.BrushColor = "lightgray"
    'GraphicsWindow.FontName = "Digital-7 Mono"
    GraphicsWindow.FontName = "calibri"
     GraphicsWindow.FontSize = 50
    time_text = Shapes.AddText("")
    Shapes.Move(time_text,100,75)
    Timer.Interval = 1000
    Timer.Tick = start

    Sub start
      x=30  '         clock  x
      y=30  '         clock  y

     ' GraphicsWindow.Clear()
      If Clock.Hour > 12 Then
        hour = Clock.Hour-12
        ampm = "PM"
      Else
        hour = Clock.Hour
        ampm = "AM"
      EndIf
     
      Tm = Clock.Time
       Shapes.SetText(time_text,Tm+" "+ampm)
    EndSub

    ___________________________________________________________________________________



    • Edited by YLedEditor Saturday, August 27, 2016 1:03 AM
    • Marked as answer by msdn.yogesh Saturday, August 27, 2016 1:54 AM
    Saturday, August 27, 2016 12:59 AM
    Answerer
    • Edited by YLedEditor Saturday, August 27, 2016 3:33 AM
    Saturday, August 27, 2016 3:31 AM
    Answerer