A Code Snippet

Here is an example of the initialization code for the SCAP library. The code assigns a static IP address. Of course, you can also use a DHCP library for dymamic configuration of your device's IP.

** Tibbo Basic **

sub on_sys_init()
 net.ip=""        '<======== SET A SUITABLE IP ADDRESS

 if scap_start()<>EN_SCAP_STATUS_OK then
         sys.debugprint("Could not allocate the necessary number of sockets")
 end if

end sub