How to remove some characters off a char
hey guys , gals
i have yet problem,
i've gotten sim 900 board speak arduino i'm sending commands , receiving them, see updated sketch below:
my big problem want variable (che) smaller, see attached serial monitor capture,
as can see on serial monitor prints
at+csq
+csq: 10,0
ok
i want remove characters excluding 10 (the ,0 isnt train smash)
is there here can show me how this?
thanks
cal
i have yet problem,
i've gotten sim 900 board speak arduino i'm sending commands , receiving them, see updated sketch below:
code: [select]
#include <softwareserial.h>
softwareserial sim900(2, 3);
void setup() {
serial.begin(9600);
sim900.begin(4800);
serial.println("comm's initiated");
sim900power();
serial.println("sim 900 power cycle complete switch on!");
}
void sim900power() {
digitalwrite(8, high);
delay(5000);
digitalwrite(8, low);
delay(10000);
}
void loop() {
sim900.print("at+csq\r");
delay(5000);
while (sim900.available() > 0) {
char che = sim900.read();
serial.print(che);
}
}
my big problem want variable (che) smaller, see attached serial monitor capture,
as can see on serial monitor prints
at+csq
+csq: 10,0
ok
i want remove characters excluding 10 (the ,0 isnt train smash)
is there here can show me how this?
thanks
cal
the examples in serial input basics may give ideas.
you need think features identify data want extract.
for example first thing after colon , followed comma ?
if is, can use characters start , end markers.
...r
you need think features identify data want extract.
for example first thing after colon , followed comma ?
if is, can use characters start , end markers.
...r
Arduino Forum > Using Arduino > Programming Questions > How to remove some characters off a char
arduino
Comments
Post a Comment