-
wireless AI hardware with visual programming is coming
11/10/2016 at 14:56 • 0 commentsHi All
As deep learning as become a trend with the effort of giant tech company such as Intel and Nvidia, it would change your way of thinking greatly in the next several years.
With deep learning, people can easily build up machine with human-like intelligent.
(self-driving car/smart home device based your own custom etc)
With wikit AI starter kit (powered by intel curie), you can easily join the trend and start to build your own AI hardware.
smarter home device? complex gesture control wearables?
Everything is easily with wikit AI starter kit
Please visit http://wikit.co and sign up if you gonna interested
Simple three steps to build your own AI
1.power on module
2.drag and drop on iPAD (search wikitIDE on iPAD app store)
3.run
-
Application2: technology Lego compatible bricks with wikitIDE
10/20/2016 at 21:53 • 1 commentWith wikitIDE, we can build tech bricks to make your original Lego move.
-
open a new project for wikit arduino101
10/15/2016 at 16:31 • 0 comments -
wikit program road map
10/14/2016 at 15:10 • 0 commentswikit IDE has been very powerful after this entire year's development on iPAD.
It might be confusing for simply introducing the app itself. We need to put this program in real use!
Thus, besides this blog, i would add two separate application blog focusing on arduino101 A.I. and zero-wire kit
for aruidno101 A.I. , you can refer to the following link for latest github code and demo.
https://hackaday.io/project/16355-wikitide-program-arduino-101-visually
for zero-wire kit, we would publish the blog soon
-
wikit 0-wire neutron kit @maker faire NYC 2016
10/02/2016 at 14:33 • 0 commentsMEET US for wikit program at NYC Maker Faire 2016
-
wikit app 1.3.4 update for aruidno101 and 0-wire kit
10/02/2016 at 14:26 • 0 commentswikit app 1.3.3 released while 1.3.4 is under internal testing
major feature update
1) more Ui improve
2)add support for aruidno101 with the following firmware code
3) add support for 0 wire aruidno101 kit
#include <DHT.h> /* * =============================================== Example sketch using the Intel CurieIMU library and the General Vision CurieNeurons library for Intel(R) Curie(TM) devices Motion is converted into a simple feature vector as follows: [ax'1, ay'1, az'1, gx'1,gy'1, gz'1, ax'2, ay'2, az'2, gx'2, gy'2, gz'2, ...] over a number of time samples Note that the values a' and g' are normalized and expand between the running min and max of the a and g signals. After calibration is made, Use the serial monitor to edit the category of a motion, (ex= 1 for vertical, 2 for horizontal, 0 for stillness or anything else), Start moving the Curie in an expected direction, and when you press Enter the last feature vector is learned. Note that this "snapshot" approach is simplistic and you may have to teach several times a given motion so the neurons store models with different amplitudes, acceleration, etc. Ideally we want to learn consecutives vectors for a few seconds. =============================================== */ /*firmware version 1.1.6*/ /*enable RGB function/pwm vibration/temperature*/ #include "CurieIMU.h" #include <CurieBLE.h> #include <CurieNeurons.h> #include <Adafruit_NeoPixel.h> //RGB // Which pin on the Arduino is connected to the NeoPixels? // On a Trinket or Gemma we suggest changing this to 1 #define PIN 5 #define DHTPIN 3 // what digital pin we're connected to // How many NeoPixels are attached to the Arduino? #define NUMPIXELS 1 // When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals. // Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest // example for more information on possible values. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 50; // delay for half a second // const int ledPin = 13; // set ledPin to use on-board LED const int ledPin_wikit = 14; // set ledPin to use on-board LED int neuron_count = 0; //WIKIT FUSIONWIRE NETWORK #define MP6050_DATA_TYPE 0x80 #define LIGHT_DATA_TYPE 0x84 //WIKIT bit position #define WIKIT_HEADER 0x0 #define WIKIT_LIGHT 0x5 #define WIKIT_MOTION_NEURON 0x8 // the bit used in apps #define NEURON_MOTION_LEARNING_MODE_1 0x0A #define NEURON_MOTION_LEARNING_MODE_2 0x0B #define NEURON_MOTION_LEARNING_MODE_3 0x0C #define NEURON_MOTION_LEARNING_MODE_4 0x0D #define NEURON_MOTION_LEARNING_MODE_5 0x0E #define NEURON_MOTION_LEARNING_MODE_6 0x0F #define NEURON_MOTION_CATAGORY_MODE 0x10 #define NEURON_MOTION_DELETE 0x3F volatile bool WIKIT_MP6050_UPDATED = false; volatile bool NO_FUSIONWIRE_MP6050 = true; volatile bool WIKIT_LIGHT_UPDATED = false; volatile bool WIKIT_LIGHT_REQUIRED = false; volatile bool WIKIT_LED_ON_REQUIRED = false; volatile bool WIKIT_LED_OFF_REQUIRED = false; volatile bool WIKIT_RGB_R_REQUIRED = false; volatile bool WIKIT_RGB_G_REQUIRED = false; volatile bool WIKIT_RGB_B_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_CAT_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED = false; volatile bool WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED = false; volatile bool WIKIT_MODE1_LEARNING_FINISHED = false; volatile bool WIKIT_MODE2_LEARNING_FINISHED = false; volatile bool WIKIT_MODE3_LEARNING_FINISHED = false; volatile bool WIKIT_MODE4_LEARNING_FINISHED = false; volatile bool WIKIT_MODE5_LEARNING_FINISHED = false; volatile bool WIKIT_MODE6_LEARNING_FINISHED = false; volatile bool WIKIT_LEARNING_FINISHED = false; volatile bool WIKIT_NEURON_RESTARTED = false; unsigned char wikit_light; unsigned char wikit_send_value[9]; unsigned char wikit_latest_recognize; ////BLE BLEPeripheral blePeripheral; // create peripheral instance BLEService wikitService("00001523-1212-EFDE-1523-785FEABCD123"); // create service BLECharacteristic wikitDataChar("00001526-1212-EFDE-1523-785FEABCD123", BLEWrite | BLERead | BLENotify,16); BLECharacteristic wikitLedSettingChar("00001528-1212-EFDE-1523-785FEABCD123", BLERead | BLEWrite | BLENotify,16); BLECharacteristic wikitMultilinkPeripheralChar("00001531-1212-EFDE-1523-785FEABCD123", BLERead | BLEWrite | BLENotify,16); //NEURON int ax, ay, az; // accelerometer values int gx, gy, gz; // gyrometer values int calibrateOffsets = 1; // int to determine whether calibration takes place or not CurieNeurons hNN; int catL=0; // category to learn int prevcat=0; // previously recognized category int dist, cat, nid, nsr, ncount; // response from the neurons // // Variables used for the calculation of the feature vector // #define sampleNbr 10 // number of samples to assemble a vector #define signalNbr 6 // ax,ay,az,gx,gy,gz int raw_vector[sampleNbr*signalNbr]; // vector accumulating the raw sensor data byte vector[sampleNbr*signalNbr]; // vector holding the pattern to learn or recognize int mina=0xFFFF, maxa=0, ming=0xFFFF, maxg=0, da, dg; void setup() { //MQBAO Serial.begin(9600); // initialize Serial communication // initialize device pixels.begin(); // This initializes the NeoPixel library. //MQBAO Serial.println("Initializing IMU device..."); CurieIMU.begin(); // mqbao calibration happens in sensors automatically. indicated by LED on wikit zero wire // use the code below to calibrate accel/gyro offset values if (calibrateOffsets == 1) { //MQBAO Serial.println("About to calibrate. Make sure your board is stable and upright"); delay(5000); //MQBAO Serial.print("Starting Gyroscope calibration and enabling offset compensation..."); CurieIMU.autoCalibrateGyroOffset(); //MQBAO Serial.println(" Done"); //MQBAO Serial.print("Starting Acceleration calibration and enabling offset compensation..."); CurieIMU.autoCalibrateAccelerometerOffset(X_AXIS, 0); CurieIMU.autoCalibrateAccelerometerOffset(Y_AXIS, 0); CurieIMU.autoCalibrateAccelerometerOffset(Z_AXIS, 1); //MQBAO Serial.println(" Done"); } // Initialize the neurons and set a conservative Max Influence Field hNN.Init(); hNN.Forget(1000); //set a conservative Max Influence Field prior to learning //int value=hNN.MAXIF(); // read the MAXIF back to verify proper SPI communication //Serial.print("\nMaxif register=");Serial.print(value); //while (!Serial); // wait for the serial port to open // set the local name peripheral advertises //BLE_START blePeripheral.setLocalName("CurieNeuron"); blePeripheral.setDeviceName("CurieNeuron"); // set the UUID for the service this peripheral advertises blePeripheral.setAdvertisedServiceUuid(wikitService.uuid()); //blePeripheral.setAdvertisedServiceUuid("0901"); // add service and characteristic blePeripheral.addAttribute(wikitService); blePeripheral.addAttribute(wikitDataChar); blePeripheral.addAttribute(wikitLedSettingChar); blePeripheral.addAttribute(wikitMultilinkPeripheralChar); // assign event handlers for connected, disconnected to peripheral blePeripheral.setEventHandler(BLEConnected, blePeripheralConnectHandler); blePeripheral.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler); // assign event handlers for characteristic wikitDataChar.setEventHandler(BLEWritten, wikitDataCharacteristicWritten); wikitLedSettingChar.setEventHandler(BLEWritten,wikitLedSettingCharcteristicWritten); wikitMultilinkPeripheralChar.setEventHandler(BLEWritten,wikitMultilinkPeripheralCharcteristicWritten); //BLE END // advertise the service digitalWrite(ledPin,LOW); digitalWrite(ledPin_wikit,LOW); blePeripheral.begin(); //MQBAO Serial.println(("Bluetooth device active, waiting for connections...")); } void loop() { blePeripheral.poll(); //delay(10); // Learn if push button depressed and report if a new neuron is committed //if (WIKIT_LIGHT_REQUIRED){ //while (!WIKIT_LIGHT_UPDATED){}; if(WIKIT_LIGHT_UPDATED){ wikit_send_value[WIKIT_HEADER] = 0x55; //wikit_send_value[5] = 0x55; wikit_send_value[WIKIT_LIGHT] = wikit_light; //wikit_send_value[3] = 0x22; wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_LIGHT_UPDATED = false; //Serial.print("\nLight data sended"); WIKIT_LIGHT_REQUIRED = false; } //} if (WIKIT_LED_ON_REQUIRED){ digitalWrite(ledPin_wikit,HIGH); WIKIT_LED_ON_REQUIRED = false; } if (WIKIT_LED_OFF_REQUIRED){ digitalWrite(ledPin_wikit,LOW); WIKIT_LED_OFF_REQUIRED = false; } if (WIKIT_RGB_G_REQUIRED){ pixels.setPixelColor(0, pixels.Color(0,30,0)); // Moderately bright green color. pixels.show(); // This sends the updated pixel color to the hardware. delay(delayval); WIKIT_RGB_G_REQUIRED = false; } if (WIKIT_RGB_R_REQUIRED){ pixels.setPixelColor(0, pixels.Color(30,0,0)); // Moderately bright green color. pixels.show(); // This sends the updated pixel color to the hardware. delay(delayval); WIKIT_RGB_R_REQUIRED = false; } if (WIKIT_RGB_B_REQUIRED){ pixels.setPixelColor(0, pixels.Color(0,0,30)); // Moderately bright green color. pixels.show(); // This sends the updated pixel color to the hardware. delay(delayval); WIKIT_RGB_B_REQUIRED = false; } if (WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED){ wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = wikit_latest_recognize; //means ERROR wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); delay(51); } /////NEURON LEARNING/CATOGRORIZING DEFAULT IS OFF if (!WIKIT_MOTION_NEURON_CAT_REQUIRED) { if (!WIKIT_MODE1_LEARNING_FINISHED || !WIKIT_MODE2_LEARNING_FINISHED || !WIKIT_MODE3_LEARNING_FINISHED || !WIKIT_MODE4_LEARNING_FINISHED || !WIKIT_MODE5_LEARNING_FINISHED || !WIKIT_MODE6_LEARNING_FINISHED){ if (WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED) { //MQBAO Serial.print("\nLearning motion category mode1"); //Serial.print(catL); // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 1); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE1_LEARNING_FINISHED = true; neuron_count = 0; } else if (WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED) { // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 2); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE2_LEARNING_FINISHED = true; neuron_count = 0; } else if (WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED) { // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 3); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE3_LEARNING_FINISHED = true; neuron_count = 0; } else if (WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED) { // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 4); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE4_LEARNING_FINISHED = true; neuron_count = 0; } else if (WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED) { // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 5); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE5_LEARNING_FINISHED = true; neuron_count = 0; } else if (WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED) { // learn 5 consecutive sample vectors for (int j=0; j<2; j++){ for (int i=0; i<5; i++) { getVector(false); // the vector array is a global //Serial.print("\nVector = "); //for (int i=0; i<signalNbr*sampleNbr; i++) {Serial.print(vector[i]);Serial.print("\t");} ncount=hNN.Learn(vector, sampleNbr*signalNbr, 6); wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = ((neuron_count+1)*9); //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); neuron_count++; } //MQBAO Serial.print("\tNeurons="); Serial.print(ncount); } WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED = false; //mqbao FIXME need to send back data here wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 100; //means success wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); WIKIT_MODE6_LEARNING_FINISHED = true; neuron_count = 0; } WIKIT_LEARNING_FINISHED = WIKIT_MODE1_LEARNING_FINISHED & WIKIT_MODE2_LEARNING_FINISHED & WIKIT_MODE3_LEARNING_FINISHED & WIKIT_MODE4_LEARNING_FINISHED & WIKIT_MODE5_LEARNING_FINISHED & WIKIT_MODE6_LEARNING_FINISHED; //mqbao 2016.09.04 dummy code } } else //NEURON CATOGROTY { if (WIKIT_MOTION_NEURON_CAT_REQUIRED){ // Recognize getVector(false); // the vector array is a global hNN.Classify(vector, sampleNbr*signalNbr,&dist, &cat, &nid); // if (cat!=prevcat) { if (cat!=0x7FFF) { //Serial.print("\nMotion category #"); Serial.print(cat); //mqbao FIXME need to send back data here if (NO_FUSIONWIRE_MP6050){ //delay(1000); } //for (int i = 0; i < 10; i ++){ wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = cat; //means success wikit_latest_recognize = cat; wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); // } } else { //Serial.print("\nMotion unknown"); //mqbao FIXME need to send back data here if (NO_FUSIONWIRE_MP6050){ //delay(1000); } // for (int i = 0; i < 10; i ++){ wikit_send_value[WIKIT_HEADER] = 0x55; wikit_send_value[WIKIT_MOTION_NEURON] = 33; //means ERROR wikit_latest_recognize = 33; wikitDataChar.setValue(wikit_send_value,sizeof(wikit_send_value)); // } } prevcat=cat; } WIKIT_MOTION_NEURON_CAT_REQUIRED = false; } } /////NEURON LEARNING/CATOGRORIZING DEFAULT IS OFF } void getVector(bool mode) { // the reset of the min and max values is optional depending if you want to // use a running min and max from the launch of the script or not mina=0xFFFF, maxa=0, ming=0xFFFF, maxg=0, da, dg; for (int sampleId=0; sampleId<sampleNbr; sampleId++) { //Build the vector over sampleNbr and broadcast to the neurons if (NO_FUSIONWIRE_MP6050){ CurieIMU.readMotionSensor(ax, ay, az, gx, gy, gz); }else{ if (mode){ while(WIKIT_MP6050_UPDATED == false); //Serial.print("\n mqbao get mp6050 data success"); WIKIT_MP6050_UPDATED = false; // waiting for another update }else{ delay(1); } } // update the running min/max for the a signals if (ax>maxa) maxa=ax; else if (ax<mina) mina=ax; if (ay>maxa) maxa=ay; else if (ay<mina) mina=ay; if (az>maxa) maxa=az; else if (az<mina) mina=az; da= maxa-mina; // update the running min/max for the g signals if (gx>maxg) maxg=gx; else if (gx<ming) ming=gx; if (gy>maxg) maxg=gy; else if (gy<ming) ming=gy; if (gz>maxg) maxg=gz; else if (gz<ming) ming=gz; dg= maxg-ming; // accumulate the sensor data raw_vector[sampleId*signalNbr]= ax; raw_vector[(sampleId*signalNbr)+1]= ay; raw_vector[(sampleId*signalNbr)+2]= az; raw_vector[(sampleId*signalNbr)+3]= gx; raw_vector[(sampleId*signalNbr)+4]= gy; raw_vector[(sampleId*signalNbr)+5]= gz; //delay(10); } // normalize vector for(int sampleId=0; sampleId < sampleNbr; sampleId++) { for(int i=0; i<3; i++) { vector[sampleId*signalNbr+i] = (((raw_vector[sampleId*signalNbr+i] - mina) * 255)/da) & 0x00FF; vector[sampleId*signalNbr+3+i] = (((raw_vector[sampleId*signalNbr+3+i] - ming) * 255)/dg) & 0x00FF; } } } void blePeripheralConnectHandler(BLECentral& central) { // central connected event handler //MQBAO Serial.print("Connected event, central: "); //MQBAO Serial.println(central.address()); } void blePeripheralDisconnectHandler(BLECentral& central) { // central disconnected event handler //MQBAO Serial.print("Disconnected event, central: "); //MQBAO Serial.println(central.address()); digitalWrite(ledPin,LOW); digitalWrite(ledPin_wikit,LOW); NO_FUSIONWIRE_MP6050 = true; blePeripheral.begin(); } void wikitDataCharacteristicWritten(BLECentral& central, BLECharacteristic& characteristic) { // central wrote new value to characteristic, update LED //MQBAO Serial.print("\nDataCharacteristic event, written: "); //digitalWrite(ledPin,HIGH); //MQBAO Serial.print(wikitDataChar.value()[0]); if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_1){ WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE1_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_2){ WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE2_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_3){ WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE3_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_4){ WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE4_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_5){ WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE5_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_LEARNING_MODE_6){ WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 20160904 added WIKIT_MODE6_LEARNING_FINISHED = false; //mqbao 20160904 added }else if (wikitDataChar.value()[0] == NEURON_MOTION_CATAGORY_MODE){ WIKIT_MOTION_NEURON_CAT_REQUIRED = true; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = true; //mqbao 20160904 added WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED = false; //mqbao 20160904 cleaning all learning status here }else if (wikitDataChar.value()[0] == NEURON_MOTION_DELETE){ WIKIT_NEURON_RESTARTED = true; WIKIT_MOTION_NEURON_MODE1_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_MODE2_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_MODE3_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_MODE4_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_MODE5_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_MODE6_LEARN_REQUIRED = false; WIKIT_MOTION_NEURON_CAT_REQUIRED = false; WIKIT_MOTION_NEURON_SEND_CAT_REQUIRED = false; //mqbao 0721 added WIKIT_MODE1_LEARNING_FINISHED = false; //MQBAO Serial.println("mqbao delete"); WIKIT_MODE2_LEARNING_FINISHED = false; //otherwise the case will hang up --- 2016.9.4 try to open WIKIT_MODE3_LEARNING_FINISHED = false; //otherwise the case will hang up --- 2016.9.4 try to open WIKIT_MODE4_LEARNING_FINISHED = false; //otherwise the case will hang up --- 2016.9.4 try to open WIKIT_MODE5_LEARNING_FINISHED = false; //otherwise the case will hang up --- 2016.9.4 try to open WIKIT_MODE6_LEARNING_FINISHED = false; //otherwise the case will hang up --- 2016.9.4 try to open neuron_count = 0; } else if (wikitDataChar.value()[0] == 0x03){ WIKIT_LIGHT_REQUIRED = true; } else if (wikitDataChar.value()[0] == 0x38){ WIKIT_LIGHT_REQUIRED = false; } } void wikitLedSettingCharcteristicWritten(BLECentral& central, BLECharacteristic& characteristic) { Serial.print("\nled setting characteristics event, written: "); if (wikitLedSettingChar.value()[0] == 1){ WIKIT_LED_ON_REQUIRED = true; WIKIT_LED_OFF_REQUIRED = false; //MQBAO Serial.print("mqbao led data on\n"); } else if (wikitLedSettingChar.value()[0] == 2){ WIKIT_LED_ON_REQUIRED = false; WIKIT_LED_OFF_REQUIRED = true; } else if (wikitLedSettingChar.value()[0] == 0x17){ WIKIT_RGB_G_REQUIRED = true; WIKIT_RGB_R_REQUIRED = false; WIKIT_RGB_B_REQUIRED = false; }else if (wikitLedSettingChar.value()[0] == 6){ WIKIT_RGB_G_REQUIRED = false; WIKIT_RGB_R_REQUIRED = true; WIKIT_RGB_B_REQUIRED = false; }else if (wikitLedSettingChar.value()[0] == 8){ WIKIT_RGB_G_REQUIRED = false; WIKIT_RGB_R_REQUIRED = false; WIKIT_RGB_B_REQUIRED = true; }else if (wikitLedSettingChar.value()[0] == 0x3b){ WIKIT_RGB_G_REQUIRED = false; WIKIT_RGB_R_REQUIRED = false; WIKIT_RGB_B_REQUIRED = false; } } void wikitMultilinkPeripheralCharcteristicWritten(BLECentral& central, BLECharacteristic& characteristic) { //Serial.println(wikitMultilinkPeripheralChar.value()[0]); digitalWrite(ledPin,HIGH); /* Serial.print("wikitMultilinkPeripheralCharcteristicWritten event, written: "); Serial.println(wikitMultilinkPeripheralChar.value()[0]); Serial.println(wikitMultilinkPeripheralChar.value()[1]); Serial.println(wikitMultilinkPeripheralChar.value()[2]); Serial.println(wikitMultilinkPeripheralChar.value()[3]); Serial.println(wikitMultilinkPeripheralChar.value()[4]); Serial.println(wikitMultilinkPeripheralChar.value()[5]); Serial.println(wikitMultilinkPeripheralChar.value()[6]); Serial.println(wikitMultilinkPeripheralChar.value()[7]); */ if (wikitMultilinkPeripheralChar.value()[1] == MP6050_DATA_TYPE){//MP6050 NO_FUSIONWIRE_MP6050 = false; ax = (wikitMultilinkPeripheralChar.value()[3] << 8) | wikitMultilinkPeripheralChar.value()[4]; ay = (wikitMultilinkPeripheralChar.value()[5] << 8) | wikitMultilinkPeripheralChar.value()[6]; az = (wikitMultilinkPeripheralChar.value()[7] << 8) | wikitMultilinkPeripheralChar.value()[8]; gx = (wikitMultilinkPeripheralChar.value()[9] << 8) | wikitMultilinkPeripheralChar.value()[10]; gy = (wikitMultilinkPeripheralChar.value()[11] << 8) | wikitMultilinkPeripheralChar.value()[12]; gz = (wikitMultilinkPeripheralChar.value()[13] << 8) | wikitMultilinkPeripheralChar.value()[14]; //Serial.println(ax); /* Serial.println(ax); Serial.println(ay); Serial.println(az); Serial.println(gx); Serial.println(gy); Serial.println(gz); */ WIKIT_MP6050_UPDATED = true; }else if (wikitMultilinkPeripheralChar.value()[1] == LIGHT_DATA_TYPE) {//LIGHT wikit_light = wikitMultilinkPeripheralChar.value()[3]; WIKIT_LIGHT_UPDATED = true; } }
-
wikit IDE on IPAD released new version
05/20/2016 at 04:29 • 0 commentsThe latest version 1.2.6 has been released. Feel free to download it to have a try.
We will upload an instruction about quick start to let you get the "wikit IDE" working even without our hardware!
In this version,
1) add new modules supports (SG90)
2)fix bug in flowchart running when double click return at the end of editing
3)add GPIO aware betwwen hardware and software to elimiate hardawre connection limitation for better user experience
4)add software driver auto-generated based on hardware you picked
in hardware page, we can simply test all hardware with drag and drop no coding on software page. all function works once you finish the logic flowchart -
redefine wikit features
11/18/2015 at 02:24 • 0 commentsWe just redefine some of the wikit features based on makers feedback.
It would be more helpful in this way. Do let us know if we miss anything which you wanted most
With wikit, you can make real complex hardware projects without any technical barrier!
1. Arduino code import to visual flowchart block makes you using arduino resources without coding knowledge
2. Detail hardware connection guidance with self-testing function help you get rid of any hardware trouble before programming
3. More than 100 build-in flowchart hardware module driver blocks give you a quick start
4. build-in elementary access flowchart blocks allow you to D.I.Y your own function
5. Unique compiling algorithm provides you a chance to export design ready code to some specific MCU platforms for production
-
How wikit prototyping works
11/06/2015 at 13:49 • 0 commentsNote this demo is trying to show my current understanding of the interactive during making electrnoics
To have better video demo, I am using simulator on MAC with desktop screenshot. Hope you could give me some feedback on such interaction for this prototyping. Anything will be great
-
wikit popcorn demo
11/06/2015 at 13:41 • 0 commentsVisual programming has been mainly used in education side. When it comes to complex hardware design, it is not very useful. Although currentlty we ONLY enable the GPIO read write. We enabled a popcorn robot with sound positioning and voice recognition.
See how powerful wikit would be with flowchart programming!
additional electronics device list
microphone x 2
resistor
transister pnp 9014 x 1
op LM393 x 1
YS-LDV7 voice recognition x 1
motor x 1
toy gun x 1
Here is the scheme
microphone --> analog to digital detection circuit --> pulse signal -- > wikit sound positioning
YS-LDV7 voice recognition ---> level signal -- > wikit read
Finally, wikit controls motor by using SW spi interface
Video Results
Here is the circuit for analog to digital detection circuit. It would take the analog input and output pulse when sound is beyond a specific threshold