tempF = (1.8 tempC) + 32; leftdigit = tempF; rightdigit = (tempF 10) - (leftdigit 10); fprintf(atlanta,”CURRENT TEMPERATURE IN ATLANTA IS %3lu.%1lu\r\n”,leftdigit,right digit); }
All that’s left to do is add the command code to fetch
the temperature:
if(CharInQueue()) { bitein = recvchar(); switch(bitein) { case ‘1’: hb1outa; fprintf(atlanta,”CMD 1 RECEIVED - A is ON\r\n”); break; case ‘2’: hb1outb; fprintf(atlanta,”CMD 2 RECEIVED - B is ON\r\n”); break; case ‘3’: hb2brake; fprintf(atlanta,”CMD 3 RECEIVED - H-Bridge is OFF\r\n”); break; case ‘4’: getTemp(); break; }
PIC18F46J13 microcontroller and an RN-171-XV to control
devices over a LAN and the Internet, the possibilities are
nebulous. And to think, this all started with a very simple
PIC circuit which didn’t morph as the project requirements
increased.
I figure you want to see this work on an Android
device. So, I’ll leave you with Screenshot 5. SV
30 amp
f o r Arduino
Robot Shield
Features:
; Supports 8 – 28 servos
The temperature probe I used is
shown in Photo 5. You can get your
own ENV-TMP from Atlas Scientific.
The ENV-TMP draws practically no
current. So, you can actually power it
from one of the PIC18F46J13’s I/O
pins.
We Have Reached Escape Velocity
Now that you know how to use a Sources
; Servo load measurement on up
to 12 servos allowing pressure
control and touch detection
; Run Arduino on 3-18 VDC
; Designed to run on a single
4. 8 – 7. 2 Volt battery pack
; Accepts up to 3 expansion
boards and additional shields
; Built-in 3-axis accelerometer
; 3 LED drivers up to 500 ma per
output
Microchip
PIC18F46J13
PIC18F47J13
RN-171-XV
www.microchip.com
Custom Computer Services
CCS C Compiler
www.ccsinfo.com
DYN
DynDNS
www.dyndns.com
Atlas Scientific
ENV-TMP
www.atlas-scientific.com
Compatible with Arduino Uno,
Leonardo, Mega, and Due
; Audio output with 1 watt
speaker driver
Efficient Computer Systems, LLC;;; www.bot-logic.com
SERVO 06.2013 57