New Homepage Forums Sensor Shields proximity does not respond

This topic contains 14 replies, has 4 voices, and was last updated by avatar Amr 1 year, 8 months ago. This post has been viewed 882 times

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #7555
    avatarsiti irani
    Participant

    hi. i make project to detect distance between smartphone and 1sheeld. i am using proximity shield with my smartphone (sony xperia) and arduino and using sms shield to notify if phone is outside range with 1sheeld.  Unfortunatly it doesn’t work. No response on Phone (proximity is 0.0 CM).sometimes it just change to 1.0cm although i bring my phone more than 1.0cm. can i know how the proximity calculate the distance, and my phone not receive the message if the distance between phone and 1sheeld is outside the range. but the TXD and RXD led blinking faster but proximity didnt chage value if i move the phone and didnt receive mssge. can u help me figure out the problem? thank you!

    this coding i just took from 1sheeld libaray:

     

    #7559
    avatarEslam Ali
    Participant

    Hi siti irani ,

    Actually it’s not a big problem as the proximity only gives two certain values and also it’s dependable upon each device for example in sony the proximity measures from 0 -> 1 cm while for my samsung device it measures from 0 -> 8 cm and there are others from 0->5 cm but the problem here is simple in the condition you are working on just state to be equal the most measured value by your device 😉 please check this code

    on a side note please check how to insert  code in your topics or replies Here it simple and easy ;-).

    …Eslam

     

    #7584
    avatarsiti irani
    Participant

    i have try the coding u give but it doesnt work at all. but TXD and RXD led keep blinking means 1sheeld keep transmit and receive data right? but my smartphone didnt receive any sms or notification at all.

    #7587
    avatarEslam Ali
    Participant

    No problems siti let us go on after these steps and check the problem :

    1- Open another example at Files>>Examples>>OneSheeld>>Simple>>Mic and compile.

    2-After success compiling switch the UART switch to the Uploading mode if you haven’t dealt with this situation i can refer you to point 6 at the Getting Started Tutorial Here also there’s a simple video in the tutorial.

    3-Then after Uploading please make sure that the Arduino IDE informed you that the sketch is successfully uploaded on your Arduino and also make sure to open the communication between Arduino and 1Sheeld by switching the UART switch back to the operating mode.

    4-Connect the application and then open your mic then place the LED on pin 13 if the led turns on when you make noise so 1Sheeld Hardware is OK and we gonna check back with the same steps from 1 to 3 but for the proximity example. If not so probably we gonna go for another test and it will take us a little more time but we will not 😉 no worries.

    Please inform me once you finish debugging.

    …Eslam

    #7628
    avatarsiti irani
    Participant

    hi eslam. i’m finish debugging. i have done the mic tutorial and it work. the led on when i make some noise but when i do the proximity example it still didnt work properly. i only receive 1 message when phone outside range and proximity change to 1.0cm for awhile. thats all. whats confusing me is txd and rxd led keep blinking faster but no sms receive. is my 1sheeld have problem? or my smartphone ? thanks in advance for the reply!

    #7629
    avatarEslam Ali
    Participant

    So you did received the Notification from 1Sheeld ..!? because if yes.. so all you have to do now is just check the number you want to send the SMS to and please make sure of how the format is being used back at your country for making calls as you may need to add some extra numbers with the (+) sign before the actual number 😉 .

    …Eslam

    #7638
    avatarsiti irani
    Participant

    I did receive the notification from 1sheeld, but 1 time only, and sometime i didnt receive notification at all. i already insert +(my number) but its also didnt work. what i realise is when i try the getting started tutorial, we give some noise to mic at smartphone and led(output) is blinking, thats mean its works right? but when use proximity to send message(output) or other notification its didnt work.

    #7654
    avatarsiti irani
    Participant

    hi eslam. i think i have figured out the problem. the proximity sensor in my smartphone in the front, so when i move the phone outside range proximity didnt work because 1sheeld cant read the proximity sensor from back of phone. when i place front phone to 1 sheeld, the proximity work and i have received the notification and message.

    #7660
    avatarEslam Ali
    Participant

    Great to hear that the problem is solved 😉 . wish you the best with 1Sheeld :-).

    Thanks,

    …Eslam

    #7662
    avatarsiti irani
    Participant

    but i have 1 more question, the proximity only change from 0.0cm to 1.0cm only even though i move my phone farther.

    #7665
    avatarEslam Ali
    Participant

    Yeah actually for most of Sony devices the proximity sensor interferes only if you are less than 1cm near from your phone some other device support till 8cm. anyway can you explain why would you need to measure further distances from your phone?

    Thanks,

    #7673
    avatarsiti irani
    Participant

    I have to make project to notify parents if baby left inside the car. i will installed 1sheeld inside child car seat, and when parents leave the car ( outside  specific range) with their smartphone and they forgot to take their child, 1 sheeld will notify parents that their child still inside the car.

    #7754
    avatarEslam Ali
    Participant

    Great IDEA ….!!  let us know about your progress and please share your project in our projects section 😉 .

    Thanks 🙂 .

    …Eslam

    #72076
    avatarhtooaunghlaing95
    Participant

    When i try to compile the code that @Eslam mentioned, I got the following error! What does it mean and what to do ?

    #121921
    avatarAmr
    Keymaster

    Hi,

    If your code compiles properly and gives your these WARNINGS then it means that your code size is too big according to the available memory so you can add this line of code at the top of your code to limit the 1Sheeld library to the used shields only:

    That’s it 😉

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.