How to use inoise8_2d

DutchOrange
Posts: 74
Joined: Fri Dec 04, 2020 4:23 pm

How to use inoise8_2d

Postby DutchOrange » Wed Jun 30, 2021 5:45 pm

So I want to control a buzzer using noise.h from Fast Led. This is my code so far:
I have not found any examples to understand better.

Code: Select all

#include "mdf_common.h"
#include "mwifi.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <stdio.h>

#include <led_strip.h> 
#include <noise.h> 
#include "driver/gpio.h"
#include <driver/adc.h>
#include "esp_adc_cal.h"


uint8_t pData[]; 

uint8_t num_points = 8; 
uint8_t octaves = 5;
uint16_t x = 0.5; 
int scale = 3;
uint16_t time = 2; 

void app_main(void)
{
    while(1){
    fill_raw_noise8(uint8_t *pData,num_points,octaves, x, scale, time); 
        vTaskDelay(100 / portTICK_RATE_MS); 
    }
}
But Iam unsure of how to assign this to a buzzer or a single pin.
Any help will be appreciated.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 243 guests