Anything not specifically related to the Speeduino hardware. Eg sensors, bluetooth, displays etc
By criscecconello
#41947
Hi Guys,

I need some help about Bluetooth connection, in Arduino Mega is plug n' play in parallel in Serial0, but in Teensy 3.5 the Serial is related about USB, I connected my Bluetooth module in Serial1 (pin 0 and pin 1) and tried in the beginning code insert this syntax: #define Serial Serial1 to attribute all code to Serial1 and run with Bluetooth, but I didn´t have success.
If somebody gives light to fix this problem for running my Speeduino with Bluetooth I appreciate it.

Thanks
By dazq
#41950
criscecconello wrote: Wed Apr 08, 2020 7:44 pm Hi Guys,

I need some help about Bluetooth connection, in Arduino Mega is plug n' play in parallel in Serial0, but in Teensy 3.5 the Serial is related about USB, I connected my Bluetooth module in Serial1 (pin 0 and pin 1) and tried in the beginning code insert this syntax: #define Serial Serial1 to attribute all code to Serial1 and run with Bluetooth, but I didn´t have success.
If somebody gives light to fix this problem for running my Speeduino with Bluetooth I appreciate it.

Thanks
If you change all references to Serial to say _Serial
Then add
HardwareSerial &_Serial = Serial1;
Before the begin, then that should work, this is how canserial works( see cancomms.h)
You could call the _Serial whatever you liked.

I'm typing this from memory , but if you look at the above reference you will see what I mean.
By criscecconello
#41960
Good Moring,

I tried to use this syntax in the begin of Speeduino.ino:
Speeduino.png
Speeduino.png (16.26 KiB) Viewed 5410 times
But the Bluetooth not working, I tried to change the syntax to #define HardwareSerial &_Serial = Serial1; but I receive errors during compilation. I don't have experience with codes, if you could help me to fix this and in what place I need to add this define, if in .ino or .h.

Thanks
By dazq
#41968
Don't forget that every mention of "Serial " everywhere else must also be changed to _Serial too.
By criscecconello
#41974
Hi again,

I still have problems, I replaced all instances Serial to Serial1.
In init.h I added #define HardwareSerial = Serial1;
I uploaded the code, but the Speeduino did not answer my commands, I add in void loop Serial.println("test"); and I received the word "test" back in my Bluetooth application.
I think is problems with Serial1.read not reading the serial commands via bluetooth.

Another test that I did, I used this code:

void setup() {
Serial1.begin(115200);
}

void loop() {

if (Serial1.available() > 0) {
Serial1.println(Serial1.read());
}
}// close loop

And when I used this code, I sent a letter "a", for example, and I received the answer "a"; so this indicates that the Bluetooth module read commands and send back correct.

For this, I think it has some configuration in Speeduino that I miss to Serial1 read, please one more time if you can help me to indicate where I did a mistake I appreciate it.

Thanks
By NickZ
#42151
you can't really fix it and one of the reasons i moved away from the teensy platform and really there isn't a reason to use the teensy.
By criscecconello
#42183
Hi,

Ok, I understand, with new information, what the processor do you recommend and this another processor will be available 8 sequential cylinder now or in future?
Thanks
MAP LOOKUP & TS DEFINITIONS

See how the write commands use the identifiers to […]

Ok, I feel so stupid. I was running the Uno output[…]

Let's all have a laugh for second. There's trash[…]

It has been done more than a few times, there was […]

Still can't find what you're looking for?