How does one generate an output signal?
I've been playing with the demo code for our new ind.io but can't get it to raise any pins to HIGH. I'm assuming that the CH1, CH2... labels correspond to pins 0, 1... I've stripped the code down to the bare minimum writing HIGH and LOW to all the available pins. But I don't see voltage on any of the channels. What am I missing? (Code below)
#include <Indio.h>
#include <Wire.h>
void setup() {
// put your setup code here, to run once:
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(14, OUTPUT);
pinMode(15, OUTPUT);
pinMode(16, OUTPUT);
pinMode(17, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(0, LOW);
digitalWrite(1, HIGH);
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
digitalWrite(14, HIGH);
digitalWrite(15, LOW);
digitalWrite(16, HIGH);
digitalWrite(17, LOW);
}
Hi Michael,
The IND.I/O uses an expander over I2C to drive the I/O so you need to use the Indio library to access the analog and digital pins. Detailed explanation on https://github.com/Industruino/libraries#indio
Only the pins on the 14-pin IDC connector (normally used for the Ethernet module) have direct access to the MCU; they can be controlled via standard commands as in your example.
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
Asked: 9/26/16, 11:52 PM |
Seen: 3089 times |
Last updated: 9/27/16, 3:39 AM |