I'm trying to find the distance between two bluetooth beacons which are typically in the distance of 60cm or less. Direction is not an issue, I'm only looking to figure out the distance between the beacons and there will be no interferences such as walls/objects in between. Is it possible to detect the distance through RSSI Measurements? and if so what will be the expected accuracy?
I currently have a setup where I send a char using a Tx of 434MHz and an Uno to a Mega with a Rx. The Mega counts how many times it receives the char and then if it falls below a certain number it triggers an alarm. Is this a viable way to measure the distance between two microcontrollers while indoors or is there a better way.  Transmitter (Mega)  #include &lt;SoftwareSerial.h&gt;  int rxPin=2; //Goes to the Receiver Pin int txPin=5; //Make sure it is set to pin 5 going to input of receiver  SoftwareSerial txSerial = SoftwareSerial(rxPin, txPin); SoftwareSerial rxSerial = SoftwareSerial(txPin, rxPin); char sendChar ='H';  void setup() {   pinMode(rxPin, INPUT);   pinMode(txPin,OUTPUT);   txSerial.begin(2400);   rxSerial.begin(2400); }  void loop() {   txSerial.println(sendChar);   Serial.print(sendChar); }   Receiver  #include &lt;SoftwareSerial.h&gt;  //Make sure it is set to pin 5 going to the data input of the transmitter int rxPin=5;  int txPin=3; //Don't need to make connections int LED=13; int BUZZ=9; int t=0;  char incomingChar = 0; int counter = 0;  SoftwareSerial rxSerial = SoftwareSerial(rxPin, txPin);  void setup() {   pinMode(rxPin, INPUT); //initilize rxpin as input   pinMode(BUZZ, OUTPUT); //initilize buzz for output   pinMode(LED, OUTPUT); //initilize led for output   rxSerial.begin(2400); //set baud rate for transmission   Serial.begin(2400); //see above }  void loop() {   for(int i=0; i&lt;200; i++) {     incomingChar = rxSerial.read(); //read incoming msg from tx      if (incomingChar =='H') {       counter++; //if we get bit "h" count it       }     delay(5); //delay of 10 secs   }   Serial.println(incomingChar);   Serial.println(counter); //prints the the bits we recieved    if(counter&lt;55) {     //if we receive less than 100 bits than print out of range triggers alarm     Serial.println("out of range");      tone(BUZZ,5000,500);digitalWrite(LED,HIGH);   }   else {     noTone(BUZZ);digitalWrite(LED, LOW);     //if we get more than 100 bits than we are within range turn off alarm     Serial.println("in range");    }    counter = 0;   incomingChar=0; }
Why are high white balance temperatures redder when warmer objects are bluer? I know it's dumb to ask this type of questions. But, I still don't get this. I've read the "Black body" story and know that when it's heated, it gives off colors; 'warm' colors (red→orange→yellow..) that have low color temperatures, at low temperatures, (I mean, when it is cooler than afterwards) right? And, the black body gives off 'cold' colors (white→blue..) that have high color temperatures at high temperatures (when it is hotter than before), right? Correct? So there're two, yes, very dumb, questions and the latter one is dumber..     Why are that 'warm' colors said to have low temperatures? And 'cold' colors vice versa? So the redder colors have lower c/t and bluer colors have higher c/t, then   why does the camera's color temperature - adjusting slider has the bluer colors on the left, and the redders on the right?       Please, forgive me for my ignorance... Sorting citations using \cites command in biblatex I am using biblatex for citations and bibliography. Now I often have lists of multiple citations, for which biblatex has the \cites command. Now I can get citations to automatically sort if I don't want page numbers, but I cannot get it right with page numbers.  What I want is all citation ordered chronological (oldest first). Is this possible, or must I just do this by hand?  Here is an example.  \documentclass[11pt,oneside]{memoir}  \usepackage[     style=authortitle,     useprefix=false,     maxnames=2,     firstinits=true,     sortcites=true,     uniquename=init,     abbreviate=true,     backend=biber,     sorting=ynt ]{biblatex}  \begin{filecontents}{jobname.bib} @book{tom1,   author = {Author, A.},   year = {2001},   title = {This book is from 2001},   shorttitle = {2001}, } @book{tom2,   author = {Author, A.},   year = {1999},   title = {This book is from 1999},   shorttitle = {1999}, } \end{filecontents}  \addbibresource{jobname.bib}   \begin{document} This one is corrent.\footnote{\Cites{tom1,tom2}.} This one is corrent.\footnote{\Cite{tom1,tom2}.}   This one is incorrent.\footnote{\Cites{tom1}{tom2}.} This one is incorrent.\footnote{\Cites[1]{tom1}[12]{tom2}.} \end{document} Using PTSerif-TLF for Cyrillic with TeX Gyre Pagella Difference between "per" and "a" Client should send one big packet or multiple smaller ones per frame? The client can do several actions per frame, for instance, requesting a movement, shooting etc. Should i send a packet to the server for each action the client performed during the frame, or should i stack them in an unique packet and send it at the end of the frame?  EDIT: i'm using Jmonkeyengine and the provided network API SpiderMonkey. How to perfectly align UV coordinates automatically? I have this setup:   The mesh is only the visible top side, with a mirror modifier for the bottom part. Now I want to unwrap it like in the picture. I want the inner circle (red) to go to the top of the UV map...  The problem is that no matter what automatic unwrapping I use, it never works as intended.  The closest I've gotten was by using "follow quads", but that skewed the UV map a lot:   I used the result from the second image and manually adjusted the vertices with a lot of scaling and "align auto", but its very far from perfect as you can see in the first image.  Here's what I want exactly:   The uv vertices should be distributed evenly (horizontally) The middle line (yellow) should be on a "natural" y height (so there's no stretching)   I hope it's clear what I want to achieve. I'm sure there must be some automatic way to perfectly align and distribute the UVs in this way.  By the way: If you look closely you can see that I already placed a uv seam (aligned with the green y axis in the screenshot) but that didn't really help. How do I uninstall xcode 5 command line tools? Are there 'stack' sites for Mac or Windows? There is Ubuntu and Unix/Linux site but is there special 'stack' site for Mac and Windows?  For context, the question I am looking to ask: I accidentally connected a Windows NTFS formatted HDD to a Mac. And the Mac (may be) quick-formatted it. I think that the information is there, but the FAT table is gone. How I can recover the information. How do I URL encode a string Reviewer Stats showing wrong count I have totally reviewed 716 suggested edits, but it shows I've approved 486 suggestions and rejected 228.     I searched about it on meta. But, can't get solution. I thought that some of my reviewed posts might get deleted. So, I went to the review history and found      .   It should be a bug. Warning or confirmation on new tag creation In retrospect of this , I would like to ask the community how they feel about a warning or confirmation (or just special highlighting) on new tag creation.  Everybody hates stock "are you sure?" confirmation, but a lot of tags get created by mistake (and then used ad nauseam).   For example, I think I might have created the  tag by accident. Assuming the right tag was , there would be two tags for c# 4.0, until they are made synonyms. With a warning, some accidental tags could be prevented. get submit button id How do I craft command blocks? I went to my friends house, and he was playing Minecraft on the PC. He showed me a command block, but when I went home and opened Minecraft pocket edition, I went to the crafting table but I could not find any command blocks to craft.  What are command blocks and how do I craft them? Why don't they use the transporter in the final fight in Star Trek Into Darkness? When Spock was chasing, and beating, Khan over a transport in San Francisco, Uhura orders them beamed both back  to the Enterprise, while Chekov says something like:     Its impossible, they are moving!                                   But in the first movie, it was Chekov that transported back to Kirk and Sulu, avoiding hitting the Vulcan planet when trying to disable the Romulan drilling platform. So my friend has a USB flash drive that isn't working. I don't know a whole lot about "recovery" software so I figured I'd ask you guys.  What steps can I try (I have access to a Linux machine as well) to see....if I can get ANYTHING off the flash drive?  I've google'd around, but most of the stuff seems for windows. Prove that $d(n)\leq 2\sqrt{n}$ In Waclaw Sierpinski's book Elementary Theory of Numbers on page 168 there is the following exercise:  "Exercises. 1. Prove that for natural numbers $n$ we have $d(n) \leq 2\sqrt{n}$," where $d(n)$ is the number of divisors of n.  As a hint right below is given: "The proof follows from the fact that of two complementary divisors of a natural number $n$ one is always not greater than $\sqrt{n}$.  I understand the hint but I don't know how it can be used to prove $d(n)\leq 2\sqrt{n}$.  Complementary divisors are pairs of divisors that when multiplied gives the number that is to be divided. For example the number $120$ has the complementary divisors: \begin{align*} &amp; 1, 120 \\ &amp; 2, 60 \\ &amp; 3, 40 \\ &amp; 4, 30 \\ &amp; 5, 24 \\ &amp; 6, 20 \\ &amp; 8, 15 \\ &amp; 10, 12 \\ \end{align*} How do you prove that $d(n) \leq 2\sqrt{n}$? It didn't fixed the error. So, how do I fix my GUI update?  For every software I have to install it from command line because I got same error when install software from Ubuntu Software Center. I am trying to prove that any conjugate of $a$ has the same order as $a$.  Let $G$ be a group and let $a \in G$.  An element $b \in G$ is called a conjugate of $a$ if $b=xax^{-1}$.  My professor gave us a hint.  Prove $a^k=e$ iff $b^k=e$ for all $k \in \mathbb{Z}$ implies $o(a) = o(b)$.  My first move is to $b^k = (xax^{-1})^k = (x^{-1})^ka^kx^k = (x^{-1})^kex^k = (x^{-1})^kx^k=x^{-k+k}=x^0$  I am not sure that I am doing this correctly?  I am trying to get $b^k=e$.  However when I raise $(xax^{-1})^k$, I am not sure if I what I have done is correct?  I am kind of confused here. I am using the Service Console in Lightning Experience, and using the Chatter Feed component on the Case layout to display updates to the Case.  If I use the "Log a Call" Quick Action from the Chatter publisher, these calls are displayed in the Chatter feed.  This is the desired behaviour.  However, if I insert a Log a Call record related to the Case any other way - e.g. using the Developer Console, or my CTI system's custom components - the call does not display in the feed.  If I query the record, it looks exactly the same as the record that is created with the Quick Action.  It just seems that the Chatter post is never made in this situation.  I have checked my Feed Tracking settings:   Task has Enable Feed Tracking and Subject checked Case has All Related Objects checked   How can I enable calls created with a custom component (part of a CTI system) to display in the case feed? How to sample from a discrete distribution? Assume I have a distribution governing the possible outcome from a single random variable X.  This is something like [0.1, 0.4, 0.2, 0.3] for X being a value of either 1, 2, 3, 4.  Is it possible to sample from this distribution, i.e. generate pseudo random numbers upon each of the possible outcomes given the probability of that outcome. So if I wanted to know what the probability of getting a 2 is, the sampling operation may return 0.34 or something like that.  The reason I ask is that I'm trying to implement an action selection policy for a reinforcement learning method based on a research paper. From what I gather from the paper, the author is able to sample the distribution by "mapping the uniform distribution U[0,1] through cumulative probability density functions obtained by adaptive numerical integration". From this he then samples the transition probabilities for each trial...  I would be grateful for any info on this...  Thanks in advance