Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:17:24+00:00 2026-06-08T02:17:24+00:00

I am using bluetooth 4 (Low Energy) and need to transfer an 8-bit slider

  • 0

I am using bluetooth 4 (Low Energy) and need to transfer an 8-bit slider value to my slave device. The receiving end should get something like this : 000000A3 but right now I am stuck with A3000000

I have tried different solutions:

int value = ((int)slider.value >> 24) ;
NSData *dataToWrite = [NSData dataWithBytes:&value length:4]; //data to be sent has to be of type NSData

and

int value[] = {0x00, 0x00, 0x00, slider.value};

and the only working one

char value[4] = {0x00, 0x00, 0x00, slider.value};

but I think this looks a bit ugly. Any other ideas on how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:17:26+00:00Added an answer on June 8, 2026 at 2:17 am

    Core Foundation has functions for handling byte-order conversions: Byte-Order Utilities Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the bluetooth low energy Heart Rate Monitor working using corebluetooth.framework on IOS
Im using Bluetooth to transfer image from Android camera.callback to PC. on windows side
how to get list of bluetooth devices using ExternalAccessory.framework not using Gamekid framework, core
I'm using JNI to get a IntPtr to a bluetooth connection method. The code
I am using a Bluetooth device to connect with the android Phone manually there
I want to send a file to a device (phone) using bluetooth nothing fancy.
I’m trying to develop an Android application for a medical device using Bluetooth (SPP).
How can I remotely start an activity in a different android device using Bluetooth?
Hi i wanna work with some bluetooth communication using my Android device. How can
How would I go about using bluetooth to transfer a core data entity with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.