Hello,
I hope this is the right place for my post this time.
My problem concerns about values that must be converted into another form. I'm working with E-blocks products (with Flowcode V4 AVR) and the idea is to send a temperature data from node 3 to node 1 via ZigBee connection. Node 1 is the coordinator which consists of AVR microcontroller multiprogrammer, graphical display and a Zigbee board. Node 3 act as an end device and it consists of AVR microcontroller multiprogrammer, a sensor board, a zigbee board and an analogue temperature probe (HSTMP).
I've managed to get the system work so that node 3 sends resistance values to node 1 and the graphical LCD displays the value which is 152 while the real temperature in the working area is around +21 Celsius degrees. When it gets warmer, resistance value starts to decrease. When it gets colder, value starts to increase.
Now the problem is, that I don't have enough skills to change the flowcodes so that the LCD would display Celsius degrees. I have a flowcode file (by Benj, who have released it earlier), which should help me with this thing. However I don't know how to combine it with my flowcodes to get the system work. The LCD also displays the signal strength of a zigbee connection. The problem is that when the nodes 1 and 3 are taken further away from each other, signal strength increases. It should be so, that the signal strength should decrease, right?
I would be very grateful if you could help me with this situation. I attach my flowcodes of node 1 an 3 and also the code which I think it's important piece in this problem. I hope you could modify those flowcodes so that the result would be temperature sensor displaying Celsius degrees. I'm sure that there's few things wrong in my flowcodes, because I'm newbie with flowcodes and coding in general . I'm surprised that I have got this far without asking your help.
In advance I thank you very much for your help!
Regards
Matt
Resistance values into Celsius degrees in ZigBee system
Moderator: Benj
Resistance values into Celsius degrees in ZigBee system
- Attachments
-
- ThermoCalcDisplay1.fcf
- (7.5 KiB) Downloaded 252 times
-
- End_Node_3.fcf_avr
- (8.5 KiB) Downloaded 242 times
-
- Coordinator_Node_1.fcf_avr
- (13.5 KiB) Downloaded 239 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Resistance values into Celsius degrees in ZigBee system
Hi Matt,
The flowchart that uses look-up tables ( data is within the View, project options and Supplementary code) that Ben posted for pic version, I have converted it to AVR version.
I do not have AVR programmer or chip to test with, so not 100% sure it will work as I can't test it.
Flowcode does not simulate C code and since look-up tables uses C you will be unable to check it works with Flowcode simulator.
The main difference between pic and avr version:
Pic uses(only with boostC and not Hitec)
and avr uses(I have been a bit lazy and not counted the actual total of data entries, so just set at the maximum value it could have been = 255)
If you are unsure on how LUT works I have tried to explain it here:
http://www.matrixmultimedia.com/mmforum ... 072#p23207
Also there is a post here:
http://www.matrixmultimedia.com/mmforum ... =26&t=3543
Hope this helps
Martin
The flowchart that uses look-up tables ( data is within the View, project options and Supplementary code) that Ben posted for pic version, I have converted it to AVR version.
I do not have AVR programmer or chip to test with, so not 100% sure it will work as I can't test it.
Flowcode does not simulate C code and since look-up tables uses C you will be unable to check it works with Flowcode simulator.
The main difference between pic and avr version:
Pic uses
Code: Select all
rom char* degrees =and avr uses
Code: Select all
unsigned char degrees [255]If you are unsure on how LUT works I have tried to explain it here:
http://www.matrixmultimedia.com/mmforum ... 072#p23207
Also there is a post here:
http://www.matrixmultimedia.com/mmforum ... =26&t=3543
Hope this helps
Martin
- Attachments
-
- ThermoCalcDisplay1.fcf_avr
- Converted from PIC version to work with AVR
- (7.5 KiB) Downloaded 242 times
Martin
Re: Resistance values into Celsius degrees in ZigBee system
Thanks Martin. The flowchart (ThermoCalcDisplay1.fcf_avr) compiled successfully. So far so good
Now I'll try to combine it with those two other flowcharts (node 1 and 3). However I still would be grateful if someone, more skillful then me, could make me a working system that I described in case I could not get it done myself.
Matt
Now I'll try to combine it with those two other flowcharts (node 1 and 3). However I still would be grateful if someone, more skillful then me, could make me a working system that I described in case I could not get it done myself.
Matt