Code Monkey home page Code Monkey logo

onewirespark's People

Contributors

balbano avatar hotaman avatar jenesaisdiq avatar monkbroc avatar notlesh avatar olet-toporkov avatar rickkas7 avatar sheldoncooper07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onewirespark's Issues

'PIN_MAP' was not declared in this scope

Veryfing code using this library in Particle Build fails with this error:

OneWire/OneWire.cpp:142:1: error: 'PIN_MAP' was not declared in this scope
 PIN_MAP[_pin].gpio_peripheral->BRR = PIN_MAP[_pin].gpio_pin

Duo not supported

HI,
I recently purchased a few DUO's from Redbear, they can be used in the Particle IDE and work fine. They combine both WiFi and BLE in almost the same footprint as the Photon.

Apperantly the Platform_ID is not a typical Particle ID and hence some code that checks the platform ID doesn't compile in the IDE.
Unfortnately also the OneWireSpak code.
Could you have a look at this ?

OneWire/OneWire.h:121:6: error: #error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core, Photon, P1 or Electron ***" #error "*** PLATFORM_ID not supported by this library. PLATFORM should be Core, Photon, P1 or Electron ***" ^
KR, Rudy

Add support for Electron

The Electron's not yet out, but compiling this on a prototype Electron gives me:

*** PLATFORM_ID not supported by this library. PLATFORM should be Core or Photon ***"

The Electron's PLATFORM_ID will be 10, and I expect the implementation will be very similar (if not identical) to the Photon implementation.

Raspberry Pi Update

I hope there is still interest in this project. I have not been able to get this code to work on the Raspberry Pi.

'INPUT' was not declared in this scope

Veryfing code using this library in Particle Build fails with this error:

OneWire/OneWire.cpp:135:15: error: 'INPUT' was not declared in this scope
  pinMode(pin, INPUT)

Feature Request: Move to new low level IO pin operations

I maintain a DS18B20 lib for particle users and the new lib manager will allow for dependancies so I will no longer include a copy of your lib in mine. I was asked by some of the elites to migrate to the new low level IO functions instead of the pinmap method that has been used for so long. I am happy to complete this work but I need some guidance on a few things.
Low Leve Input/Output - Particle Docs
Example from reset()

digitalWriteFast(_pin, LOW);
    pinModeFastOutput();   // drive output low

I have moved from digitalWriteFastLow to digitalWriteFast but the command after that is where I am confused. This is common in most functions and I am sure needed but I can't determine what it is doing besides setting the pin to output but wouldn't digitalWriteFast already have the pin in output mode? It says "drive output low" in the comments but the prior command will do the same. Please advise and I am happy to submit a PR if/when I get it all working. Thanks.

Temperature reporting as 1200°C

Hi, have you ever encountered the following behaviour with your library? It's returning > 1200°C. It's pretty hot in the UK today, but not quite that hot :)

I'm using a Dallas 18B20 marked 1345C4 +210AA.

ROM = 28 D F9 A1 5 0 0 12
  Chip = DS18B20
  Data = 1 5 4B 46 7F FF C 10 1C FF  CRC=60
  Temperature = 1200.31 Celsius, 2192.56 Fahrenheit
No more addresses.

An Arduino using the OneWire library with the same sensor and wiring provides:

ROM = 28 D F9 A1 5 0 0 12
  Chip = DS18B20
  Data = 1 D6 1 4B 46 7F FF A 10 43  CRC=43
  Temperature = 29.37 Celsius, 84.87 Fahrenheit
No more addresses.

I've tried using both direct and parasitic power mode (Vcc tied to Gnd, 3V3 to 4.7k resistor on DQ), with the same output.

If I remove the sensor, I just get No more addresses., so I'm confident the Spark Core is receiving data. On an Arduino, CRC changes, but it seems to remain at 60 on the Spark Core.

Thanks!

P1 Support

Awesome this library supports the Photon -- thanks for that! I see that PLATFORM_ID with a compile error is directly handled in the header. Is there any reason that, if this library now works on the Photon (PLATFORM_ID = 6), then it cannot work on the P1 variant (PLATFORM_ID = 8). It certainly compiles and I can get around to testing it myself to verify, but thought I'd go ahead and ask since the PLATFORM_ID was not already explicitly included.

Does not compile

Hi, I fork this library example and try to verify/compile at spark.io/build and get errors:

In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:29,
from readtemp.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]

warning "Defaulting to Release Build"

^
readtemp.cpp:2:21: fatal error: OneWire.h: No such file or directory

include "application.h"

^
compilation terminated.
make: *** [readtemp.o] Error 1

'pinMode' was not declared in this scope

Veryfing code using this library in Particle Build fails with this error:

OneWire/OneWire.cpp:135:20: error: 'pinMode' was not declared in this scope
  pinMode(pin, INPUT)

Latest version not compiling?

Hi @Hotaman,

We're noticing that there seems to be an new recent issue compiling this library in the IDE, did something change recently that would have impacted this? Anything we can do to help?

Thanks!
David

'GPIO_TypeDef' was not declared in this scope

Veryfing code using this library in Particle Build fails with this error:

OneWire/OneWire.cpp:146:1: error: 'GPIO_TypeDef' was not declared in this scope
 GPIO_TypeDef *gpio_port = PIN_MAP[_pin].gpio_peripheral

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.