well, since im entirely sidetracked to begin with.
i need to learn proper syntax just to ask a question, its akin to learning a new language just to ask a question. when all you want is an answer, since the code was simple enough, a screenshot took 2 seconds, provided every bit of detail that was required. rather effecient i thought.
as far as being a wanker, well, i coulda told you that, i didnt need to learn that from a forum.
im using 32 bit linux on an old pc as a coding machine, im assuming that formatting requires 64bit java? because i am unable to format my code in the IDE on this machine.
eh, i dont mind windows, this computer is so old tho(it came with xp) that it doesnt even load xp well. but, LDXE linux enviroment runs decent for most of what i use this for. (its very light.)
I just dont want to move my workbench near my computer and viceversa. so, its handy to have this dinosaur to type on.
yeah, im not sure, it pretends to format, but, never actually moves any text.
it would behoove me to be more consistent when typing, i guess the addage of lazy programming is true. (i guess its probably cause theres so many thoughts going on, its just easier to dump what you can, or something)
okay, apparently this is proving more complicated than it aught to. The transmitter is printing a 7 just fine, and the TX light is blinking every second accordingly. The receiving unit does not print the variable like its supposed to, the RX light does not light.(assuming it is just not receiving, as it just displays "-1")
Wiring is lcd is to scl/sda for the lcd screen, and TX and RX are hooked up crossed like they aught to, with a common ground.(its why im using the mega2560 as it has both scl/sda and tx/rx that arent the same pinouts.)
The receiving unit is a mega2560
The sending unit is a nano, ATmega328P
Receiver code:
#include <LiquidCrystal_I2C.h> //Import the LCD library
LiquidCrystal_I2C lcd(0x27,20,4); //set the pins outputting to lcd
int mode = 0;
int receivedChar;
boolean newData = false;
void setup() {
lcd.init();
lcd.backlight();
lcd.clear();
Serial.begin(9600);
}//end setup
void loop() {
switch(mode){
case 0:
recvOneChar();
showNewData();
break;
}
}
void recvOneChar() {
//if (Serial.available() > 0) {
receivedChar = Serial.read();
newData = true;
lcd.setCursor(0,0);
lcd.print(receivedChar);
// }
}
void showNewData() {
if (newData == true) {
Serial.print("This just in ... ");
Serial.println(receivedChar);
newData = false;
}
}
Transmitter code:
int mode = 0;
int send = 7;
void setup() {
Serial.begin(9600);
}//end setup
void loop() {
switch(mode){
case 0:
Serial.print(send);
delay(1000);
break;
}//end switch(mode)
}//end loop