Dependencies: Motor 16_Channel_Analog VL53L0X
main.cpp
- Committer:
- sylvaingauthier
- Date:
- 2020-07-17
- Revision:
- 0:324dc73a5829
- Child:
- 1:53b992a47b28
File content as of revision 0:324dc73a5829:
/* mbed Microcontroller Library * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 */ #include "mbed.h" #include "perceptron.h" #include <vector> #include <iostream> #include <stdio.h> int main() { printf("debut\r\n"); vector<float> Wg = {1,1,-1,-1}; perceptron perceptronG(Wg); vector<float> Wd = {1,-1,-1,1}; perceptron perceptronD(Wd); vector<int> X = {1,1,1}; printf("X=%d,%d,%d\r\n",X[0],X[1],X[2]); int Vg=perceptronG.predict(X); int Vd=perceptronD.predict(X); printf("Vg=%d\r\n",Vg); printf("Vd=%d\r\n",Vd); }