Hi guys im trying to send data from phone to pro mini through bluetooth, but look like the pro mini does not receiving the data that i sent. I have try to use arduino uno and it is work. Is it promini cannot read serial?
Please provide some clues to your project such as a schematic and the full sketches that you are using
For instance, which pins on the Pro Mini are you using for Serial and how do you know that it is not receiving the data ?
is there a problem with pro mini spec and serial on pro mini?
Not as far as I know
If I were you I would start with a simple sketch that prints the characters that it receives from Bluetooth
i have use serial.print on arduino uno, but pro mini is more complicated because need to use usb ttl. when open the port will always busy warning pop up
Pro Mini and UNO use the same processor, ATMega328P.
Sorry, but I don't understand what you are saying
Which pins are you using for the Bluetooth serial connection on the Pro Mini ?
Why did you delete your code from this topic ?
#include <SoftwareSerial.h>
#include <Adafruit_NeoPixel.h>
#define rxPin 8
#define txPin 7
const int led_row =4;
const int led_col=36;
int led_count= led_row *led_col;
int pot=A1;
Adafruit_NeoPixel strip = Adafruit_NeoPixel (led_count,2,NEO_GRB + NEO_KHZ800);
SoftwareSerial mySerial(rxPin, txPin); // RX, TX
byte numChar=0;
byte numChar1=0;
byte myChar[40];
byte i=0;
byte h1=0;
byte io=0;
byte value_r=255;
byte value_g=0;
byte value_b=0;
byte color_in_row[12];
int index_animasi=0;
byte color_data[9][3]{
{0,255,255},
{255,255,0},
{255,0,0},
{0,255,0},
{0,0,255},
{0,255,255},
{255,0,0},
{0,0,255},
{255,255,255}
};
void ani1();
void ani2();
void ani3();
void ani4();
void ani5();
void ani6();
void ani7();
void ani8();
void ani9();
void ani10();
void ani11();
void ani12();
void ani13();
void ani14();
void ani15();
void ani16();
void ani17();
void ani18();
void ani20();
void ani21();
void ani22();
void ani23();
void ani24();
void ani25();
void ani26();
void ani27();
void ani28();
void ani29();
void ani30();
void ani31();
void ani32();
void ani33();
void ani34();
void ani35();
void ani36();
void ani37();
void ani38();
void (*animations[])() =
{
ani1,
ani2,
ani3,
ani4,
ani5,
ani6,
ani7,
ani8,
ani9,
ani10,
ani11,
ani12,
ani13,
ani14,
ani15,
ani16,
ani17,
ani18,
ani20,
ani21,
ani22,
ani23,
ani24,
ani25,
ani26,
ani27,
ani28,
ani29,
ani30,
ani31,
ani32,
ani33,
ani34,
ani35,
ani36,
ani37,
ani38,
};
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Test Wave");
mySerial.begin(9600);
mySerial.println("Hello, world?");
strip.begin();
strip.show();
}
void loop(){
if(mySerial.available()){
i=0;
myChar[numChar1] = mySerial.read();
delay(100);
Serial.print(myChar[numChar1]);
Serial.print(" ");
Serial.print(numChar1);
numChar1++;
if(numChar1>=37){
numChar1=0;
}
h1=1;
io=1;
}
else{
numChar1=0;
if(io==0){
i=0;
for(int g=0;g<=37;g++){
myChar[numChar] = g;
Serial.print(myChar[numChar]);
Serial.print(" ");
Serial.print(numChar);
Serial.println();
numChar++;
}
if(numChar>=37){
numChar=0;
}
io=1;
}
}
if(h1==0){
animations[myChar[i]]();
Serial.print(myChar[i]);
Serial.print(" ");
Serial.print(i);
i++;
if(i>=37){
i=0;
}
}
h1=0;
Serial.println();
}
none havent tried bluetooth from pro mini?
No from the Pro Mini, to the Pro Mini
It looks like you are using pins 8 and 9, but I don't understand what you mean by not being able to print what you receive
ahh thanks i just remember i move the rx and tx to pin 7 and 8. ill try to fix tomorrow at workplace
Could you please explain how this is supposed to function?
All your animations block, that is to say they run to completion, whatever that mean in each case.
So the response to user input may be sluggish? And seem like it isn't doing anything or not what you want?
Anyway, I made this just to watch what they all do:
It just runs them one after the other and leaves out the comms/UI stuff.
I have no energy to untangle just how the user is supposed to control this, so help me.
TIA.
a7
wow, what a great apps you use there, but usually the mistake is, in arduino uno i use software serial at the rx and tx pin at 8 and 7, different with pro mini which where i use the tx and rx pin is default. That is why i have revise my code not using software serial and serial.begin(9600). So basically the mistake is regarding technical circuit
regarding how th user control is through apps, i think u cannot control from there.
Thank you for the clarification.
a7
Why ?
Using the Rx and Tx pins with SoftwareSerial is not a good idea because they are used by the normal hardware Serial interface
my uno tx and rx pin 0,1 pin having a problem that is why i use software serial
Those pins are for hardware serial.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.