コード例 #1
0
ファイル: ESP8266AVRISP.cpp プロジェクト: 0xPIT/Arduino
ESP8266AVRISP::ESP8266AVRISP(uint16_t port, uint8_t reset_pin, uint32_t spi_freq, bool reset_state, bool reset_activehigh):
    _reset_pin(reset_pin), _reset_state(reset_state), _spi_freq(spi_freq), _reset_activehigh(reset_activehigh),
    _server(WiFiServer(port)), _state(AVRISP_STATE_IDLE)
{
    pinMode(_reset_pin, OUTPUT);
    setReset(_reset_state);
}
コード例 #2
0
ファイル: transport.cpp プロジェクト: caocf/iot-platform
void transportMgr::initailize(char * pSsid,IPAddress ipAddress,int pServerPort,int pFindPort)
{

	status=WL_IDLE_STATUS;
	serverPort=pServerPort;
	findPort=pFindPort;
	strcpy(ssid,pSsid);
	Serial.println("Attempting to connect to network...");
	Serial.print("SSID: ");
	Serial.println(ssid);
	

	// Attempt to connect to Wifi network.
	while ( status != WL_CONNECTED) 
	{ 
	Serial.print("Attempting to connect to SSID: ");
	Serial.println(ssid);
	status = WiFi.begin(ssid);
	}  
	serverSocket=WiFiServer(pFindPort);
	serverSocket.begin();
	printConnectionStatus();
	protocolManager.initailize();
	serverIP=ipAddress;
	curCount=0;
	memset(bufJsonData,0,LENGTH_OF_JSON_STRING);
}
コード例 #3
0
int wifiChat::begin()
{
  
  ssid = "Connectify-21"; //  your network SSID (name)
  pass = "******";    // your network password (use for WPA, or use as key for WEP)
  keyIndex = 0;            // your network key Index number (needed only for WEP)
  status = WL_IDLE_STATUS;
  alreadyConnected = false; // whether or not the client was connected previously
  WiFiServer tserver = WiFiServer(23);
  server=tserver;
  return 0;
  //return tryConnect();
}