Advices required for Soap dispenser / sanitizer code


Results 1 to 8 of 8

Threaded View

  1. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Advices required for Soap dispenser / sanitizer code

    IF you use the comparator its as simple as this.it won't re-arm itself until hand is removed

    Name:  ldr_sw.png
Views: 2113
Size:  16.4 KB


    Code:
    #config
       __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON 
    #endconfig
    DEFINE OSCCAL_1K 1
    DEFINE OSC  4
    
    CMCON    = %00001110
    TRISIO   = %111011
    
    vrcon=$88    ;about vcc on 2
     ANSEL=1
    tmp var byte
    Main: 
    intcon=$40
    pir1=0
    PIE1=8
    asm   
     SLEEP
     nop
    endasm 
    if  CMCON.6 then
    gpio.2=1
    pause 1000
    gpio.2=0
    endif
    goto main
    END
    Last edited by richard; - 12th September 2020 at 12:25.
    Warning I'm not a teacher

Similar Threads

  1. Thermistor based temperature reading short code required
    By asifiqbal in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th November 2014, 08:18
  2. Cash dispenser
    By tigerflow in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2009, 10:40
  3. Help Required for Newbie
    By Moz in forum General
    Replies: 7
    Last Post: - 13th August 2004, 00:05
  4. Help Required
    By lester in forum Forum Requests
    Replies: 2
    Last Post: - 19th July 2003, 22:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts