- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
How do I achieve this in MRAA
/* Map an analog value to 8 bits (0 to 255) */
void setup() {}
void loop()
{
int val = analogRead(0);
val = map(val, 0, 1023, 0, 255);
analogWrite(9,<span style="color: # 000000; font-family: 'TyponineSans Monospace Regular 4'; font-size: 14px; background-color: # e...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello dunex_1,
You could write your own version of the map() function. It is easy to implement. Please check the following site where it is explained (check the Appendix section): https://www.arduino.cc/en/Reference/Map Arduino - Map
Regards,
Diego.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello dunex_1,
You could write your own version of the map() function. It is easy to implement. Please check the following site where it is explained (check the Appendix section): https://www.arduino.cc/en/Reference/Map Arduino - Map
Regards,
Diego.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you DiegoV_intel,
I really appreciate it. It worked

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page