Find Jobs
Hire Freelancers

Javascript programming

£20-250 GBP

In Progress
Posted over 4 years ago

£20-250 GBP

Paid on delivery
We are a Commercial Internet of Things installer based in Cornwall UK and need assistance with very small amounts of Javascript coding. The "payload" decoder below is what we already have: /* simple payload decoder. */ var TYPE_VDD = 0x07; //VDD 2byte 0-65535mV var TYPE_PULSE1 = 0x0A; //2bytes relative pulse count var TYPE_PULSE1_ABS = 0x0B; //4bytes no 0->0xFFFFFFFF var TYPE_EXT_TEMP1 = 0x0C; //2bytes -3276.5C-->3276.5C var TYPE_EXT_DIGITAL = 0x0D; //1bytes value 1 or 0 var TYPE_EXT_DISTANCE = 0x0E; //2bytes distance in mm var TYPE_EXT_DIGITAL2 = 0x1A; // 1bytes value 1 or 0 var TYPE_DEBUG = 0x3D; // 4bytes debug function bin16dec(bin) { var num=bin&0xFFFF; if (0x8000 & num) num = - (0x010000 - num); return num; } function bin8dec(bin) { var num=bin&0xFF; if (0x80 & num) num = - (0x0100 - num); return num; } function hexToBytes(hex) { for (var bytes = [], c = 0; c < [login to view URL]; c += 2) [login to view URL](parseInt([login to view URL](c, 2), 16)); return bytes; } function DecodePayload(data){ var obj = new Object(); for(i=0;i<[login to view URL];i++){ //[login to view URL](data[i]); switch(data[i]){ case TYPE_VDD: //Battery level obj.vdd=(data[i+1]<<8)|(data[i+2]); i+=2; break case TYPE_PULSE1: //Pulse input 1 var pulse1=(data[i+1]<<8)|(data[i+2]); var pulse1adjusted=pulse1*10; obj.pulse1=pulse1; obj.pulse1adjusted=pulse1adjusted; i+=2; break case TYPE_PULSE1_ABS: //Pulse input 1 absolute value var pulseAbs=(data[i+1]<<24)|(data[i+2]<<16)|(data[i+3]<<8)|(data[i+4]); obj.pulseAbs=pulseAbs; i+=4; break case TYPE_EXT_TEMP1: //External temp var temp=(data[i+1]<<8)|(data[i+2]); temp=bin16dec(temp); obj.externalTemperature=temp/10; i+=2; break case TYPE_EXT_DIGITAL: //Digital input obj.digital=(data[i+1]); i+=1; break case TYPE_EXT_DISTANCE: //Distance sensor input var distance1=(data[i+1]<<8)|(data[i+2]); obj.distance=distance1; i+=2; break case TYPE_EXT_DIGITAL2: //Digital input 2 obj.digital2=(data[i+1]); i+=1; break default: //somthing is wrong with data i=[login to view URL]; break } } return obj; } function Decoder(bytes, port) { if (bytes[0] === 0x3e) { return {}; } return DecodePayload(bytes); } The code above decodes a payload from one of our sensors. We need to ignore decoded values for " var distance1" above 4000 as these are errors. We can describe in more greater detail but essentially with the right person (with the experience and knowledge of Javascript) it may be an hours work! As we build our range of sensors and applications we will need increasing amounts of coding support
Project ID: 23171849

About the project

10 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
10 freelancers are bidding on average £177 GBP for this job
User Avatar
Hello my name is Chris. I am a js developer with extensive knowledge of development flows and good customer satisfaction. I can have your project ready within 24 hours
£111 GBP in 1 day
4.7 (43 reviews)
5.8
5.8
User Avatar
I can do your task in one hour. I am JAVASCRIPT expert. Also I have full experience with "Bitwise Operations" Thanks
£135 GBP in 1 day
4.7 (30 reviews)
5.8
5.8
User Avatar
With strong Javascript knowledge I can write the code similar to the description you provide with all the rules , I am ready to start now and we can talk more about in chat . Let's talk over in chat and discuss there
£230 GBP in 1 day
5.0 (25 reviews)
4.8
4.8
User Avatar
Greetings boss, We will be more than happy to help you because we are professionals with more than 5YEARS experience. ✓What matters most to us are; your trust, perfect functionality of your project, time uniformity and quick delivery. ✓We work in assemblage of professional computer science graduates under Shaunlee Global Circle Limited, we have several skills and expertise. ✓We can definitely give the best of your project. Kindly HIRE US and you will never regret hiring us.
£222 GBP in 2 days
5.0 (7 reviews)
3.8
3.8
User Avatar
Hi There, Hope you are doing well. Just reviewed your job description and READY to START immediately. Being a professional developer am sure that can do this project efficiently and on time. If you would like, I can show you my previous work. I can work full time in your time zone and start the work right now. If you hire me, I will deliver you good result. Waiting for your kind & positive reply and looking forward to work with you. Thanks
£222 GBP in 1 day
5.0 (4 reviews)
2.7
2.7
User Avatar
Dear Sir, I have read the project description. I can help you out in this problem. Contact with me to start the project. Thanks.
£20 GBP in 1 day
5.0 (2 reviews)
2.5
2.5
User Avatar
Can you describe in more details. I need to know where you are initializing your threshold value. Please come over the chat. I will fix it in an hour if I get the or understand it. I have 5 years of experience with js.
£222 GBP in 1 day
4.5 (3 reviews)
2.4
2.4

About the client

Flag of UNITED KINGDOM
Wadebridge, United Kingdom
4.6
1
Payment method verified
Member since Jan 2, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.