I have device set up like a combination of Raspberry Pi, Arduberry and adafruit nfc sheild. Does this disable serial port?
I wonder how can I make Arduberry talk to Raspberry Pi?
I tried
void setup()
{
Serial.begin(115200); //Start the Serial at 9600 baud
}
void loop()
{
if(Serial.read()==‘s’) //If ‘s’ is recieved, send the data back
{
int sensorValue = analogRead(A0);
Serial.print(“Hi”);
Serial.println(sensorValue); //Send ‘hi’ followed by the analog read value
}
delay(1000);
}
Is the baud rate 9600, I think you have chosen 115200 as the baud rate so change it to Serial.begin(9600), also can you send us a screenshot of the output you see.Can you check if the serial monitor is working by adding Serial.println("Hello World") after the delay(1000) in your program.
Are you getting the LED Blink program to work with ArduBerry?
Sorry I meant, what you see on your minicom, Have you tried changing the baud rate to 9600 ?
Have you tried this LED blink program. LED blink program is to know if your ArduBerry works and the aim of adding the Serial print statement is to see if Serial print works on minicom.
Couple things I want make sure, first of all, in the first link, it uses Arduberry v1, but mine is Arduberry v7.0 does that matter?
Second, does the python communication using USB connection?
Third, the ttyAMA0 that we used for NFC detection(read data), can I also use it for sending data? Will it cause conflict?
So any suggestions for my situation? I am already using ttyAMA0 for the NFC receive data, so how will I be able to send those data to the Raspberry Pi? Do you thing python works or I should pick another language?
@shaow1,
There is not a great way to use multiple serial devices. One way can be to use a serial Mux like this which would allow you to connect to multiple devices.
The other way can be to use an serial to USB adapter like this which would allow you to connect the second serial device to the USB port.
Can you send me a link to the NFC module that you are using.
@shaow1,
This NFC shield can also be connected via I2C. Would you be comfortable soldering a few pads and making a few changes on the code so that it can work over I2C.
@shaow1,
Great to hear that it is working for you now. I am not really sure how to detect that particular NFC tag. Can you check the specs of that one and see if the NFC shield supports it. Usually the NFC shield is able to read the tag as soon as the tag is brought close to it.