Ejemplo n.º 1
0
int initPatches( void )
{
	getDevkitVersion = ( void * )findProc( "sceSystemMemoryManager", "SysMemUserForUser", 0x3FC9AE6A );
	fw_version = getDevkitVersion();
	model = sceKernelGetModel();
	//Disable slim specific patches
	model = PSP_MODEL_STANDARD;
	return fw_version;
}
Ejemplo n.º 2
0
void setup() {
  sprintf(title, "IoT DevKit %s\r\nbutton A: WiFi\r\nbutton B: Sensor\r\n \r\n", getDevkitVersion());
  Screen.print(title);
  pinMode(LED_WIFI, OUTPUT);
  pinMode(LED_AZURE, OUTPUT);
  pinMode(LED_USER, OUTPUT);
  rgbLed.turnOff();

  ext_i2c = new DevI2C(D14, D15);
  acc_gyro = new LSM6DSLSensor(*ext_i2c, D4, D5);
  acc_gyro->init(NULL);
  acc_gyro->enableAccelerator();
  acc_gyro->enableGyroscope();
  
  ht_sensor = new HTS221Sensor(*ext_i2c);
  ht_sensor->init(NULL);

  magnetometer = new LIS2MDLSensor(*ext_i2c);
  magnetometer->init(NULL);

  IrdaSensor = new IRDASensor();
  IrdaSensor->init();

  pressureSensor = new LPS22HBSensor(*ext_i2c);
  pressureSensor -> init(NULL);
  
  //Scan networks and print them into console
  int numSsid = WiFi.scanNetworks();
  for (int thisNet = 0; thisNet < numSsid; thisNet++) {
     Serial.print(thisNet);
     Serial.print(") ");
     Serial.print(WiFi.SSID(thisNet));
     Serial.print("\tSignal: ");
     Serial.print(WiFi.RSSI(thisNet));
     Serial.print("\tEnc type: ");
     Serial.println(WiFi.encryptionType(thisNet));
  }   

  status = 3;
  counter = 0;
  showWiFi = false;
  isConnected = false;
  buttonClicked = false;
}