I don't really know, I'm kind of new to using Wire and i thought this would be something nice to try using it.
So perhaps, formulate a description of what it is you want to do, and ask for suggestions about which of several communication processes might be most relevant, and successful.
Post that here, so we all have access to the information presented so far in this thread.
Start with something easy, transfer a single byte.
If that works, then try an array of numbers.
If that works, then you can say that you know about Arduino and the I2C bus
I suggest to forget about sending text
I know a bit about the arduino but I'm basically totally new to the I2C bus
First of all, you could have a query for the full name of I2C.
I used to be trying to communicate with arduinos using i2c. Now I'm trying to make my own serial communication method. It is clear I haven't learnt my lesson yet.
Hence, back to post #8, no? If so, and that's not going well, post your best attempt, and people will help you. Otherwise,
Now I'm trying to make my own serial communication method. It is clear I haven't learnt my lesson yet.
isn't much of a problem statement. Have you looked on this forum for things like "Serial Tutorial" or "Serial Basics"? There's several good starts available. Once you've tried one or more and failed, c'mon back.
I'm not using Serial, I'm using my own code, no libraries (I might still add in Serial for debugging and I/O).
The concepts are the same, you just do more work 'under the hood'. At some level, you'll still want to be able to do the same higher level activities.
I'd ask "why you want to do this", but I'm afraid of the answer.
If this has to do with your question about "bool list", then it's apparent you're thinking you have to rewrite serial because you can't send booleans? Yes you can.
¯_(ツ)_/¯ I'm just doing it for the fun of it...
I'm trying to turn a serial into a bool list as part of a larger project but I cant seem to figure out how to do the code for it without using external chips such as a shift register. Help would be much appreciated.
what do you mean by a "bool list"?
IF you have a bool array you want to send by serial, then say that.
A list of bools
Hello
Post your sketch, well formated, with well-tempered comments and in so called code tags "</>" to see how we can help.
A list (single/double linked?), or an array?
say you receive either the ascii char '0' or '1' over Serial and you want a truth value then you can do something like (which is long but readable)
bool truthValue = false; // whatever default value works for you
void setup() {
Serial.begin(115200);
}
void loop() {
switch(Serial.read()) {
case '0': truthValue = false; break;
case '1': truthValue = true; break;
default: break; // just ignore, don't change the truth value
}
}
if you know you get nothing else than '0' or '1' over Serial then you can say
if (Serial.available()) // if there is something to read (either '0' or '1' then
truthValue = (Serial.read() == '1'); // read it and compare with '1'
? A serial is a port, not a data entity. Please describe what you want to do again, in detail, for more clarity.
I've merged your 2 topics as they are essentially about the same project and the same kind of problems. I can see why you started a new topic but really the context of the first one helps with understanding the second, so probably best together.
Might help if you describe the overall project better and the bits you have trouble with so people see the context and what you are trying to do, as well as what you have learnt as you go.
Thanks,