This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am werneckpaiva on github. | |
* I am ricardopaiva (https://keybase.io/ricardopaiva) on keybase. | |
* I have a public key whose fingerprint is 7077 2CBA 173A 255D 5C46 797F 196F C35C A239 0E12 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the list of partitions | |
List<PartitionInfo> partitionInfos = consumer.partitionsFor(topicName); | |
// Transform PartitionInfo into TopicPartition | |
List<TopicPartition> topicPartitionList = partitionInfos | |
.stream() | |
.map(info -> new TopicPartition(topicName, info.partition())) | |
.collect(Collectors.toList()); | |
// Assign the consumer to these partitions | |
consumer.assign(topicPartitionList); | |
// Look for offsets based on timestamp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CH1 3 | |
#define CH2 5 | |
#define CH3 6 | |
#define CH4 9 | |
#define CH5 10 | |
// Read the number of a given channel and convert to the range provided. | |
// If the channel is off, return the default value | |
int readChannel(int channelInput, int minLimit, int maxLimit, int defaultValue){ | |
int ch = pulseIn(channelInput, HIGH, 30000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package switchlookup | |
import collection.JavaConversions._ | |
object LookupTest { | |
val VALUES = List( | |
"GJMYQBNbtxUYhxInkbXB", "izZogfwZcWJOMnKfVmiR", "feCfeVlfbsNPskdOOxfa", "jgNqcbyRHVfycmFtFdpH", "vzqmtfbiwclduviXpTaw", | |
"cIQStdcUWiVuXTcGfdFK", "ppbiVAlciZhUjnowMCId", "AdckbDaDZXwZnwODhPnb", "goXpVCWiJMkaEnqSgSWU", "sjRgGBgfBXHUfnpNiwas", | |
"DACFkzLdmqmZZKcSXltF", "QpXOtUTUjXXSJqUKZIBW", "RbxYRleFYtnYUpQnIxlx", "AwQlmDfmJHLwxsQOUMvt", "cHvkUVGdOxrflgJBXgcu", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IBusBM.h> | |
IBusBM ibusRc; | |
HardwareSerial& ibusRcSerial = Serial1; | |
HardwareSerial& debugSerial = Serial; | |
void setup() { | |
debugSerial.begin(74880); | |
ibusRc.begin(ibusRcSerial); |