Hi i am trying to get my program that exists of a BT and SD shield working
What i have is a BT Shield V2.2 module, and SDcard Logshield, being run by a Arduino uno.
the problem is that my BT is eating all the Data (i can see this data with my BT program on the Laptop)
but there is no Data left for my File on the SD card.
now am wondering how to tackle/solve this problem
the Pins for the BT are put on softwareserial.h on 2,3 and also on the Jumpers of the BT.
Without seeing your code I'd say you have a different problem. You write a byte to BT, it doesn't erase the contents of the variable unless perhaps you let the data go out of scope and lose the variable.
If that is true then you need to get the data into a Global Variable so you can write it to both BT and SD.
The thing is i just dont understand, i am still getting Jibber/jabber on the BLuetooth screen on my computer.
i checked the code of the BT the thing you meant about the void, i had to correct it, there's no char init_timer2
secondly i thought it went automatic because of the function serial.print, and or BTSerial.print, i thought that if i split the signals with different Baudrates things would make a difference.
i checked the code of the BT the thing you meant about the void, i had to correct it, there's no char init_timer2
There was in the code you posted. Are you saying you removed it? Or, are you saying you posted the wrong code?
The thing is i just dont understand, i am still getting Jibber/jabber on the BLuetooth screen on my computer.
The Arduino is NOT reading anything from the bluetooth module. It is trying to talk to it. Your diddling with the pin it is trying to use may be interfering with its ability to do so. Have you removed that code?
secondly i thought it went automatic because of the function serial.print, and or BTSerial.print, i thought that if i split the signals with different Baudrates things would make a difference.
Printing is OUTPUT. Reading is INPUT. Input doesn't happen automatically, and more than output does.
1 I compared with the Bluetooth code i had, then changed it to void init_timer2()
2 I am aware that bluetooth connection is being established in the beginning, with the baudrates and so on.
3 that code of the Pin fiddling was removed.
4 the thing is that the softwareserial should make a different connection to the board over the pins 2,3, i checked this also on the Hardware of the BT shield V2.2.
5 secondly where do i start... and do i have to work with interrupts?
6 the thing is that the code that writes to the file also should write to the BTSerial that i can take from there to the screen with my Terra Term logging program.
7 this is what i have understood of the SoftwareSerial
I really really appreciated your critism. the new file is also included.
Solved the problem guys, i mixed up some BT Program, but i actually needed just the Software Serial.h and create a virtual port called BTSerial.print(values) + a Delay(100); you all put this below the Serial.flush();
ill give the example code as well so check it out.