You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							937 B
						
					
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							937 B
						
					
					
				--tips to user link-AP | 
						|
function PageAPNet() | 
						|
    Disp:clearBuffer() | 
						|
    --Disp:setFont(u8g2.font_unifont_t_symbols); | 
						|
    Disp:setFont(u8g2.font_unifont_t_symbols); | 
						|
    Disp:drawStr(0,10,"AP-LinkMode"); | 
						|
    Disp:setFont(u8g2.font_6x10_tf); | 
						|
    Disp:drawStr(0,26,"Please use your"); | 
						|
    Disp:drawStr(0,36,"mobile phone search"); | 
						|
    Disp:drawStr(0,46,"and link ap-point"); | 
						|
    Disp:drawStr(0,56,"DY-Light-Controller"); | 
						|
    Disp:updateDisplay(); | 
						|
end | 
						|
--mobile setting ap and passwd | 
						|
function AutoLinkByMobile() | 
						|
    wifi.sta.clearconfig(); | 
						|
    wifi.setmode(wifi.STATIONAP); | 
						|
    wifi.ap.config({ssid="DY-Light-Controller", auth=wifi.OPEN}); | 
						|
    enduser_setup.manual(true); | 
						|
    enduser_setup.start( | 
						|
        "DY-Light-Controller", | 
						|
        function() | 
						|
            print("Connected to WiFi!") | 
						|
        end, | 
						|
        function(err, str) | 
						|
            print("enduser_setup: Err #" .. err .. ": " .. str) | 
						|
        end | 
						|
    ) | 
						|
    print("init endUserServer") | 
						|
end |