| поискавой системы для электроныых деталей |
|
DEV-13036 датащи(PDF) 13 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13036 датащи(HTML) 13 Page - SparkFun Electronics |
|
13 / 14 page ![]() for (int pin = 0; pin < sizeof(analogChannel); pin++) analogChannel[pin] = 127; // Enumerate analog channels: for (int i =1; i < sysexBytesRead; i++) analogChannel[i 1] = storedInputData[i]; // Set each analog output to reporting for (int pin =0; pin < sizeof(analogChannel); pin++) { if (analogChannel[pin] != 127) { Serial1.write(REPORT_ANALOG | analogChannel[pin]); Serial1.write(1); } } break; } } // firmata_queryAnalogMapping() // Send the ANALOG_MAPPING_QUERY request message. // Called in init to keep track of which pins are analog ins void firmata_queryAnalogMapping() { Serial1.write(START_SYSEX); Serial1.write(ANALOG_MAPPING_QUERY); Serial1.write(END_SYSEX); } // firmata_setDigitalInputs() // Set a value in the digitalInputData array to portData void firmata_setDigitalInputs(int portNumber, int portData) { digitalInputData[portNumber] = portData; } // firmata_setAnalogInput // Set an analog pin value to [value]. void firmata_setAnalogInput(int pin, int value) { analogInputData[pin] = value; } void firmata_setVersion(int majorVersion, int minorVersion) { //! Todo } After uploading that sketch to your Edison, your Arduino Block should begin blinking the D13 pin. You can also open up the Serial Monitor to see what values your Arduino Block is reading in on D4 and A0. This serves as a simple Firmata client for the Edison, but it should be easily expandable. Try using any of these functions (defined in lower portions of the sketch) to add more features to your Edison Firmata Client: • firmata_pinMode([pin], [mode]) – As with any Arduino sketch, setting the pin’s mode is critical. Firmata requires an extra bit of information. Use any Arduino pin for the [pin] variable. For the [mode] variable use either MODE_INPUT , MODE_OUTPUT , MODE_ANALOG , MODE_PWM , MODE_SERVO , or MODE_SHIFT . • firmata_digitalRead([pin]) – Read in the digital value of a pin. This function will return a value between 0 and 1. That pin should be set as MODE_INPUT before calling this function. Page 13 of 14 |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |