MAX30102使用方式记录

最近做一个小项目,需要使用到MAX30102检测用户的心率数据,然而网上普遍没有什么教程,大概看了一下官方给的arduino示例程序。

示例程序地址:https://github.com/MaximIntegratedRefDesTeam/RD117_ARDUINO/blob/master/RD117_ARDUINO.ino

大概分析了一下,这个传感器用的是IIC协议,初始化的时候需要用IIC协议往几个寄存器里面写一些数据,这样就算是初始化了,传感器需要连接的针脚主要有VIN GND SDA SCL INT,VIN是电源,官方说的是5V,实测3.3也可以工作,SDA和SCL是IIC线,INT是一个类似状态引脚的东西,接下来从传感器读取数据的时候需要用。

传感器的原理大概就是用红外光反射检测波长来判断用户的心率,传感器可以检测返回的波长,做AD转换转换成电数据,但是没什么计算单元,所以我们从传感器的FIFO里面获取到这些数据之后,需要自己来根据这些原始的数据来计算。

计算的过程比较复杂,不过官方给的示例代码里面给出了计算的库,我们直接调用函数就可以了,大概就是把两个采样数据的buffer指针穿进去,一个参数说明用多少个采样来计算。输出的结果就是根据这些采的数据计算出的心率(HR)和血氧(SPO2),还有是否有效标记,如果标记=0说明样本是无效的,也就不能给出正确的心率和血氧。

官方给的实例代码思路大概是这样的:

读取前5秒钟的采样数据(采样速率是100样本/s,一共500个样本)
计算这500个样本的数据结果();
while(1)
{
  丢弃第一秒的前100个样本,剩下400个样本();
  采一秒钟的样本(100个);
  把新的样本数据和旧的样本数据结合(现在有500个);
  计算心率和血氧
}

这样在这个大循环里面,每秒钟都会有新的采样值,新的采样值结合前四秒钟的数据,给出当前的心率。这就是心率采样的大概思路。具体的操作和寄存器说明我还没看DataSheet,需要看一看再说。

MAX30102使用方式记录》有82个想法

  1. Columbus

    I don’t know what I want to do after university buy cialis 10mg
    Another 121 million pounds was paid to generators to standready to provide extra power at 2 minutes notice. The grid alsopaid over 15 million pounds for black start capability in casethe unthinkable happened (it didn’t).

    回复
  2. Brooklyn

    What university do you go to? cheap viagra online
    Design innovations have trickled down in boating since AlanBond – an Australian real estate and mining entrepreneur whodeclared bankruptcy in 1992 and was later imprisoned for fraud -revealed a winged keel that gave his Australia II syndicate theedge over Dennis Conner’s Liberty in the 1983 Cup.

    回复
  3. Jarred

    I’m unemployed write essay fast
    Stenson closed with an even-par 70 and finished at 7 under, missing a chance to become the first Swedish male to capture a major championship. Countryman Jonas Blixt was another stroke back, also closing with a 70.

    回复
  4. Dewayne

    I’m a trainee buy viagra 100mg John Black, president of the Royal College of Surgeons, said: ‘It is afalse economy to cut funding for this type of surgery. Any short-term savings are tiny compared with the real ongoing cost of treating obese patients.’

    回复
  5. Collin

    Where are you from? buy cialis 10mg
    “I would argue that it is the latter. It is in the interests of providers to administer a high-quality service at an efficient cost, and that is true for forensics as well. Why would a police force that wants to solve crimes not want high-quality forensics?”

    回复
  6. Alexis

    Have you got any experience? kamagra per paypal kaufen WASHINGTON – The number of Americans filing new claims for jobless benefits remained at pre-recession levels last week but growth in the massive U.S. service sector cooled in September as firms took on fewer new workers.

    回复
  7. Elliot

    Will I be paid weekly or monthly? write essay fast
    Citadel managed roughly $13.3 billion at year end. Aspokeswoman, Katie Spring, said Lee was fired in 2008 forbreaching company rules, but that his dismissal was unrelated toinsider trading. “There is no insider trading group at Citadel,”she added.

    回复
  8. Efren

    Special Delivery write essay cheap With this scheme, nursing home fees are paid from 80% of the resident’s weekly income (pension). This is then boosted by a levy on the value of that resident’s estate after their death. This levy will not exceed 15% of the home’s value.

    回复
  9. Brody

    In tens, please (ten pound notes) buy viagra 100mg So I tried again. In my most recent attempt, I found myself a copy of Pokemon: Soul Silver (completely unaware of the relevance of the name, or indeed where it fit into the series) that I had knocking around my flat for no apparent reason. And with an upcoming holiday abroad Pokémon seemed perfect for the long hours of plane travel and waiting around at airports. This would be it, I was going to throw myself into the game as much as possible in an effort to see what I had really deprived myself of in years gone by.

    回复
  10. Colton

    What do you like doing in your spare time? buy viagra 100mg The International Civil Aviation Organization agreed in Montreal on Friday to design a global scheme to reduce the growth of the sector’s greenhouse gas emissions. The scheme will be hashed out in 2016 and is intended to start in 2020.

    回复
  11. Charles

    I’m on a course at the moment cheap viagra online
    Following the ridge of the chalky escarpment of the South Downs rising in Winchester and ending 100 miles east in Eastbourne, the South Downs Way has been a favourite of runners for years. Beacons, hill forts and Anglo-Saxon oddities line the surprisingly hilly route that is both challenging and beautiful. The route also offers plenty of circular runs, especially around Seven Sisters and Brighton.

    回复
  12. Courtney

    In a meeting buy cialis 10mg
    Dungarees are without a doubt the trickiest trend of the summer. So tricky in fact that hardly anyone has dared to wear them. Today however the challenge was taken up by Jesy Nelson, who pulled them off with aplomb.

    回复
  13. Jefferey

    I’m from England cheap viagra online
    He had people telling him: “You need to go out, to put things off your mind”; or “Distract yourself”; or “Did you take your children for tests so you make sure they don’t get it too?”; or “Come on buck up, get rid of any nasty thoughts”.

    回复
  14. Darrell

    We’re at university together write essay fast
    “The lack of … progress on the jobs front is that we are not seeing dynamic hiring,” said Stephen Stanley, chief economist at Pierpont Securities in Stamford, Connecticut. “The pace of layoffs is pretty restrained and consistent with lower unemployment. There are just not enough net jobs being added.”

    回复
  15. Hipolito

    Very Good Site buy cialis 10mg
    “If I had to venture a number, I’d say we have found several dozen new locations that are elevated in one or more critical metals,” Koenig said. “With this project the goal would be to have this large data base available that would allow us to predict and to form new associations.”

    回复
  16. Stevie

    What sort of music do you listen to? buy viagra 100mg The company said it would press ahead with plans to paylong-term compensation in the New Year despite the lack of aresponse from others in the sector. The unions and families haveproposed 1.8 million thaka ($2,300) per family of the deceased.

    回复
  17. Francis

    Excellent work, Nice Design buy viagra 100mg The handling of his case by the military suggests it believes it has the support of a big majority of Egyptians. They turned out in huge numbers to protest against the Islamist leader before the army moved against him.

    回复
  18. Ollie

    Could you please repeat that? cialis kaufen paypal In our peculiar time, with our memories offloaded online, nothing is easily forgotten. Yet while right-wing exploiters of public doubt and fear make up factoids to add fuel to the fires they have lit, the so-called progressive side too often lets easily proven facts go by unnoticed.

    回复
  19. Markus

    I’m unemployed cheap viagra online
    “Justin needs to worry about punching opposing offenses in the mouth,” Canty, now a Ravens defensive tackle, said on NFL Network on Wednesday night. “The way you show that you have your coach’s back is by going out there on that football field and performing.”

    回复
  20. Devon

    We need someone with qualifications cheap viagra online
    Lowering the MSF rate makes funds cheaper for banks, therebymaking credit more accessible to borrowers just as India entersthe festive season, which typically sees heavy spending onbig-ticket items such as cars and appliances.

    回复
  21. Franklyn

    Is it convenient to talk at the moment? cheap viagra online
    “I wanted to get some dirt and stand there for the last time,” Rivera said. “Knowing I’m not going to be there no more, especially pitching — maybe throwing a first pitch one year, one day, competing, I won’t be there no more, so that little time that I was there was special for me. Just me alone there.” 

    回复
  22. Jackie

    How many are there in a book? cialis generika kaufen paypal South Korea’s problems relate to a scandal last November when Seoul shut down two reactors found to contain thousands of parts installed with forged safety certificates. Authorities took two more reactors offline in May after finding more evidence of forgeries and bribes to officials who looked the other way at the state-financed Korea Hydro & Nuclear Power Company. Of the six reactors now offline, three are undergoing regular maintenance and three are tied to the scandal as they await certified replacement parts.

    回复
  23. Sherman

    Could you tell me my balance, please? cheap cialis online “The dollar faces a lot of key event risk in the week aheadwith the release of the U.S. Q2 GDP report and the latest FOMCpolicy meeting on Wednesday, followed by the release of the U.S.employment report for July on Friday,” said Lee Hardman,currency strategist at Bank of Tokyo Mitsubishi.

    回复
  24. Rayford

    Could you tell me the number for ? write essay fast
    And, as time dragged towards the final whistle, there was still only one goal to England’s name. A shot of Hodgson on the bench shutting his eyes and letting out a silent prayer with the tension of it all spoke for the watching millions.

    回复
  25. Truman

    Could you give me some smaller notes? buy cialis 10mg
    Despite the strategic logic and potential benefits to the wider market, Fitch believes the transaction could run into protracted regulatory and competition related reviews. European policy makers have voiced concerns generally over in-market consolidation, ignoring the potential benefits of a more evenly balanced and more efficiently invested market environment.

    回复
  26. Junior

    Have you got any experience? buy viagra 100mg “The outlines of Area 51 are shown on current unclassified maps as a small rectangular area adjoining the northeast corner of the much larger Nevada Test Site,” the newly released National Security Archive documents state.

    回复
  27. Ashton

    What are the hours of work? buy viagra 100mg BRUSSELS – A European Union court ruled on Friday that the EU should lift sanctions it imposed against seven Iranian companies, dealing a new blow to Europe’s efforts to use economic pressure to rein in Tehran’s disputed nuclear work.

    回复
  28. David

    I’m sorry, he’s buy viagra 100mg “I would much rather be here today debating this,” Alexander told lawmakers, referring to the programs’ value, “than explaining why we were unable to prevent another 9/11” attack.

    回复
  29. Houston

    International directory enquiries cheap cialis online “I really didn’t want to do (a reconstruction). I just thought I’d remove the breasts and I’d be fine,” she told the Daily News. “I was so anxious for the cancer to be gone and just wanted it to be over.”

    回复
  30. Weston

    How many more years do you have to go? write essay cheap Turns out, it’s baseball’s version of The Perfect Storm. A combination of forces have merged to the point that some observers doubt a pinstriped return to prominence is possible, at least in the short term. Maybe the outsized expectations that are sewn into the Yankee fabric like numbers on a jersey are part of the problem.

    回复
  31. Whitney

    A pension scheme write essay fast
    After two failed romances – her 11-year relationship with Keith Britton, CEO of My Fashion Database and a tumultuous two-year affair with actor Bradley Cooper – the “Blood Ties” actress was ready for real love.

    回复
  32. Morris

    I’d like to send this letter by write essay cheap McDonagh’s former teammate at the University of Wisconsin, Rangers restricted free agent Derek Stepan, 23, also was scheduled to go past noon on Friday without re-signing. Stepan wants to remain in New York, though, and the Rangers intend to keep him. They will pay Stepan, last season’s top Rangers center, more than the average, as well, and should do it soon to keep him off the offer sheet market, as well.

    回复
  33. Jeffrey

    Photography buy viagra 100mg “This exhibition features Velázquez’ workshop. We can see a whole series of paintings produced in his latter years, artworks that were intended primarily for the court’s diplomatic functions,” says the museum’s director Miguel Zugaza.

    回复
  34. Cordell

    Which year are you in? buy viagra 100mg Secretary of State John Kerry has been trying to drum up international support for military strikes against Assad, meeting with members of the European Union and Arab League over the weekend following last week's fractious G20 meeting.

    回复
  35. Clark

    No, I’m not particularly sporty write essay cheap It would classify as an assault weapon as any rifle that accepts a detachable magazine that can hold more than 10 rounds of ammunition, and would ban its sale or purchase. People who already own such weapons would be required to register them.

    回复
  36. Monty

    It’s OK buy cialis 10mg
    In a statement outlining its legislative priorities, theCanadian federal government late on Wednesday said it plans tolower mobile roaming rates and force television distributorssuch as Shaw Communications Inc, Rogers CommunicationsInc and BCE Inc to unbundle televisionchannels from expensive all-in packages.

    回复
  37. Ronald

    I’m on holiday buy viagra 100mg In May last year, surrogate mother Premila Vaghela, 30, died days after delivering a child for an American couple at a clinic in Gujarat. It was recorded as an “accidental death” by police.

    回复
  38. Lucky

    Yes, I play the guitar buy viagra 100mg The daughter of the man who wrote the Oscar-winning movie “Raging Bull” is hoping the Supreme Court will give her a final second TKO against a movie studio for ownership of boxer Jake LaMotta’s life story.

    回复
  39. Harris

    I like watching football write essay fast
    Robert Powell, Global Head of Compliance, Etrali Trading Solutions, said: “Mobile Voice Recording has the potential to be a real game-changer for the industry. Users get a normal mobile call experience. Compliance departments can easily recover calls and use advanced analytics in downstream systems to meet increasing regulatory requirements.”

    回复
  40. Cornelius

    Could you tell me the dialing code for ? buy cialis 10mg
    Government ministers who trot out their litany of demons and scapegoats to absolve themselves of responsibility for the jobless figures often refer to families where no-one has had a job for two or three generations.

    回复
  41. Emmett

    I’ve lost my bank card buy cialis 10mg
    Samsung, the world’s biggest memory chip maker, is renovating its Austin, Texas chip plant with $4 billion investment to boost production of mobile processor chips since last year. It is also building a new system chips plant in South Korea with 2.25 trillion won ($2.10 billion) investment.

    回复
  42. Carmine

    I’ve just started at write essay cheap The great baseball man Branch Rickey had a famous saying: “Luck is the residue of design.” And Cherington, above all, should be able to relate to that as every one of those free agent signings performed up to the GM’s expectations.

    回复
  43. Jefferson

    What do you do for a living? write essay cheap You crazy liberals! Just think of the poor children forced to grow up in homes with loving parents, subjected to indoctrination about values like tolerance and respect!! Would you want YOUR kids living like that? This will be the ruin of us all, I tell you!!!

    回复
  44. Johnnie

    We used to work together cheap viagra online
    Before long Maxie is poring over videos of men hiding on Manhattan skyscrapers with Stinger missiles, scrutinising financial transfers to Arab hacker groups and exploring underground bunkers that may or may not shelter gangs of time-travelling brainwashed assassin children. She also matches wits with a stone-faced CIA operative, a cosmetics “nose” obsessed with Hitler’s cologne, a pair of jocose Russian mobsters and the formidable asset-stripping CEO of hashslingrz, Gabriel Ice. (This is, in fact, a relatively restrained cast list for a Pynchon novel: previous participants in his drama have included a gigantic sentient adenoid, an order of male motorcycle nuns, an airship crewed by horny children and a “Learnèd English Dog”.) One of Maxie’s contacts soon ends up dead, and a kind of laconic murder mystery sustains the narrative for a while; but this, as ever, is only there to impart vague direction to the jazzy eddies of dreams, songs and jokey backchat through which Pynchon transmits a large part of his novels.

    回复
  45. Floyd

    I don’t like pubs write essay cheap Meanwhile, Dell is staying the course with Microsoft. And this is despite the fact that Dell has never fully subscribed to the “tablet is the future” philosophy and would just as soon stay away. But the company is glued to the strategy, whatever it may be.

    回复
  46. Dexter

    I love this site buy cialis 10mg
    “Moral opprobrium attached to neither of these, though the latter is of course paying for a private education, and the former is not social but postcode mobility, potentially productive of social division.”

    回复
  47. Giovanni

    Insufficient funds buy cialis 10mg
    Gonzales’ brother, Kirt Gonzales, said the family gave cops the phone after they were allowed back into the Chauncey St. apartment where Eric McCormick, 40, allegedly pumped three bullets into Gonzales’ head and three into her torso, leaving her for her daughters, 15 and 5, to find.

    回复
  48. Joseph

    Do you know the number for ? write essay fast
    And Atletico made it seven consecutive wins in all competitions when another well-worked free-kick saw Gabi play in Arda Turan and the Turkish midfielder lashed the ball into the roof of the net five minutes from time.

    回复
  49. Clint

    Have you got any experience? write essay fast
    Attorneys for Katherine Jackson, Deborah Chang and Kevin Boyle (R) listen as jurors are polled following the verdict in Jackson’s civil lawsuit against AEG Live at the Los Angeles Superior Court in Los Angeles, October 2, 2013.

    回复
  50. Joaquin

    I’m sorry, he’s buy cialis 10mg
    The film shows Roosevelt visiting the U.S.S. Baltimore at Pearl Harbor in July 1944. Eight seconds of the clip show Roosevelt exiting a doorway on the ship and being escorted down what is apparently a ramp. The wheelchair is not clearly visible because the view of the president is screened by a line of sailors, but Roosevelt’s distinctive white hat can be seen gliding past the men at a lower level. Roosevelt, at 6-foot-2, was likely taller than most of the soldiers.

    回复
  51. Arnoldo

    Do you know the address? cheap cialis online Maybe the Nets and Knicks change that across a pro basketball season that starts next week, with a rivalry that showed such possibilities last season before it seemed to come to a sudden stop because of one of the dumbest NBA regular-season schedules ever conceived.

    回复
  52. Millard

    Is this a temporary or permanent position? write essay fast
    The latest image to come out of the European Southern Observatory’s (ESO) Very Large Telescope (VLT) represents an intriguing star-forming region in one of the Milky Way’s satellite galaxies known as the Large Magellanic Cloud (LMC).

    回复
  53. Willian

    I’d like to send this letter by levitra fedex
    2004, he realized that his climb to the top would be a hard one because he was a third-string quarterback behind starter Marcus Randall and back-up JaMarcus Russell. He played in all 12 games that season for LSU, but only three as a quarterback. You see, he was also the holder for place-kicks.

    回复
  54. Arnulfo

    I’m unemployed buy viagra 100mg The man who in the morning was wondering if he was too old was now, after effectively enjoying a 110km lead-out to earn one of his most remarkable wins, left booming: “I want to come here and continue to be successful every single year.” Life had been hard for him these past few days. One minute, urine thrown over him; the next, he ought to have been sprayed with champagne. And even if it hasn’t been his best Tour, what an unreal achievement to have now won at least two stages at each of the last six editions.

    回复
  55. Mya

    We used to work together buy viagra 100mg An important exception to this has been, in recent years, the rise of the Italian Five Star Movement. In origin a simple association of different groups of local activists coalesced around beppegrillo.it, a blog founded by former comedian Beppe Grillo, the movement quickly grew into becoming one of the main forces of the Italian political arena. Its disruptive political agenda, together with the charisma of Beppe Grillo, explains this quick rise to prominence.

    回复
  56. Gaylord

    I’d like to pay this in, please cheap cialis online “Lightning Bolt,” the 10th studio album by Seattle band Pearl Jam, who rose to prominence in the early 1990s grunge-rock movement, sold 166,000 copies in its first week, according to figures from Nielsen SoundScan.

    回复
  57. Dannie

    Directory enquiries buy viagra 100mg “I think if we strengthen the Somali security forces – with the support of (African peacekeepers) AMISOM and Ethiopian forces – I think it is possible to defeat al Shabaab. It is not something which is so complex,” he said.

    回复
  58. Evan

    I came here to study write essay cheap “It’s sad,” Bonnie Braaten, the woman who owns the burned driveway, told The News. “I’m glad no one was hurt and it didn’t spread to my house and my neighbor’s house. It could have been really bad.”

    回复
  59. Wendell

    How much will it cost to send this letter to ? write essay fast
    “The U.N. knew or should have known that its reckless sanitation and waste disposal practices posed a high risk of harm to the population, and that it consciously disregarded that risk, triggering an explosive epidemic,” the civil rights groups said in a joint press release.

    回复
  60. Sergio

    An estate agents write essay fast
    The review found that five complaints were filed against Drummond in a two-year period — more than any other officer in the command. Only one other constable received any complaints during the same time.

    回复
  61. Jarred

    I work with computers write essay cheap He was the smiling, baby-faced star of “The Partridge Family,” but fame wasn’t exactly an easy road for Danny Bonaduce. After landing a role on the famous 1970s television show at just 11-years-old, Bonaduce spent most of his later years in a downward spiral battling family abuse, drug addiction and homelessness. In 1990, Bonaduce was arrested for attempting to buy cocaine, and arrested again later for allegedly robbing and assaulting a transvestite prostitute. Since then, Bonaduce has re-launched his career — by playing himself. The loudmouthed star was recently seen on the reality shows “Breaking Bonaduce” in 2005 and “Hulk Hogan’s Celebrity Championship Wrestling.”

    回复
  62. Pitfighter

    Your cash is being counted buy cialis 10mg
    WASHINGTON — Congressional Democrats on Saturday began a cautious embrace of a new deal between the United States and Russia to destroy Syria’s chemical weapons stockpiles, suggesting that it validated President Obama’s threat of military action.

    回复
  63. Clair

    What sort of work do you do? write essay fast
    So with Millennial voters up for grabs at a crucial time for President Obama and Democrats heading into the 2014 midterms and the 2016 presidential election, it’s astonishing that there wasn’t requisite attention to making sure that — above all else! — Millennial healthcare consumers were appropriately targeted with an online rollout that was young-person approved. And it’s ironic that “the first tech President,” with all his social media savvy, didn’t get this.

    回复
  64. Everett

    A packet of envelopes write essay fast
    I’m not convinced that Trayvon did anything wrong, but even if he did decide to confront Zimmerman at some point, it doesn’t change the fact that he was stalked by Zimmerman who was carrying a loaded weapon. No one can say that Martin didn’t feel like his life was in peril. In fact, who wouldn’t feel threatened under the same circumstances? It wasn’t fair for Zimmerman to put Martin in that position when all Martin was doing was walking home from the store. Martin shouldn’t have had to decide whether to run or to stand his ground.

    回复
  65. Leigh

    Yes, I love it! cheap viagra online
    They added: “If anyone was in Praia da Luz around the time of Madeleine’s abduction and has not spoken to the Metropolitan Police, or if they know who any of the e-fits might be, please have the courage to come forward and speak to the police in confidence.”

    回复
  66. Fabian

    I’m unemployed write essay fast
    “The House needs to find a way to get a five-year farm bill done. The Speaker needs to work in a bipartisan way and present a bill that Democrats and Republicans can support. He could start by bringing the senate bill to the floor for a vote,” Sen. Debbie Stabenow, D-Mich., said in a released statement following the failed vote. “This is totally unacceptable.”

    回复
  67. Brady

    We used to work together super kamagra bestellen paypal
    The death toll of 18 makes Thursday’s bombing one of Lebanon’s deadliest in recent years, perhaps second only to what remains in the memory of many Lebanese as the most significant in the country’s modern history—a 2005 car bomb that killed former Prime Minister Rafik al-Hariri and 20 others.

    回复
  68. Parker

    Lost credit card buy cialis 10mg
    Lawyers for theater shooting suspect James Holmes launched another legal assault on Colorado’s death penalty laws Friday, arguing they don’t set clear standards and that they make it too hard for jurors to weigh mitigating factors.

    回复
  69. Nogood87

    I came here to work levitra fedex
    Then, visiting Mersea Island a few summers ago, my family and I had gone for a late-night walk along the jetty. We looked up to see the Milky Way weaving across the sky, with a bluey iridescent tint and surreal appearance.

    回复
  70. Jacob

    A packet of envelopes buy viagra 100mg Exports fell to 2 million bpd in September, the lowest ratein 19 months, as repairs and expansion work at Iraq’s strategicsouthern oil terminal sharply reduced shipments of Basra Lightcrude, which accounts for most of Baghdad’s export revenue.

    回复
  71. Garfield

    I’d like to pay this cheque in, please cheap viagra online
    The banking sector will be in the spotlight, with HSBC, Europe’s biggest bank, set to report half-year profit,expected to rise 15 percent to more than $14 billion as athree-year cost-cutting plan starts to pay off.

    回复
  72. Sergio

    Not in at the moment buy viagra 100mg The briefest glance at this year's Stirling Prize shortlist tells you modernism is still the name of the architectural awards game. Clean lines, geometric shapes and abstracted details appeal to judges brought up on a strict diet of Frank Lloyd Wright and Le Corbusier.

    回复

发表评论

邮箱地址不会被公开。