Mercurial > hg > beaglert
comparison examples/mpr121/render.cpp @ 305:b57d76dcc9ae prerelease
Merge
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 27 May 2016 17:51:34 +0100 |
parents | 421a69d42943 |
children | 9dc5a0ccad25 |
comparison
equal
deleted
inserted
replaced
304:d2b7df6b355b | 305:b57d76dcc9ae |
---|---|
52 if(!mpr121.begin(1, 0x5A)) { | 52 if(!mpr121.begin(1, 0x5A)) { |
53 rt_printf("Error initialising MPR121\n"); | 53 rt_printf("Error initialising MPR121\n"); |
54 return false; | 54 return false; |
55 } | 55 } |
56 | 56 |
57 i2cTask = Bela_createAuxiliaryTask(readMPR121, 50, "beaglert-mpr121"); | 57 i2cTask = Bela_createAuxiliaryTask(readMPR121, 50, "bela-mpr121"); |
58 readIntervalSamples = context->audioSampleRate / readInterval; | 58 readIntervalSamples = context->audioSampleRate / readInterval; |
59 | 59 |
60 for(int i = 0; i < NUM_TOUCH_PINS; i++) { | 60 for(int i = 0; i < NUM_TOUCH_PINS; i++) { |
61 gNormFrequencies[i] = 2.0 * M_PI * gFrequencies[i] / context->audioSampleRate; | 61 gNormFrequencies[i] = 2.0 * M_PI * gFrequencies[i] / context->audioSampleRate; |
62 } | 62 } |