Coder Social home page Coder Social logo

nanpy-firmware's Introduction

Nanpy

Travis Latest Version Supported Python versions Downloads

Use your Arduino board with Python. http://pypi.python.org/pypi/nanpy

Overview

Nanpy is a library that use your Arduino as a slave, controlled by a master device where you run your scripts, such as a PC, a Raspberry Pi etc.

The main purpose of Nanpy is making programmers' life easier, providing them a powerful library to create prototypes faster and make Arduino programming a game for kids.

from nanpy import ArduinoApi

a = ArduinoApi()
a.pinMode(13, a.OUTPUT)
a.digitalWrite(13, a.HIGH)

I know, there are a lot of projects able to do that, but hey, Nanpy can do more!

Nanpy is easily extensible and can theoretically use every library, allowing you to create how many objects you want. We support OneWire, Lcd, Stepper, Servo, DallasTemperature and many more...

Let's try to connect our 16x2 lcd screen on pins 7, 8, 9, 10, 11, 12 and show your first "Hello world"!

from nanpy import Lcd

lcd = Lcd([7, 8, 9, 10, 11, 12], [16, 2])
lcd.printString('Hello World!')

really straightforward now, isn't it? :)

Serial communication

Nanpy autodetects the serial port for you, anyway you can manually specify another serial port:

from nanpy import SerialManager
connection = SerialManager(device='/dev/ttyACM1')

and use it with your objects

from nanpy import ArduinoApi
a = ArduinoApi(connection=connection)
a.pinMode(13, a.OUTPUT)
a.digitalWrite(13, a.HIGH)

You can specify how many SerialManager objects you want and control more than one Arduino board within the same script.

How to build and install

First of all, you need to build the firmware and upload it on your Arduino, to do that clone the nanpy-firmware repository on Github or download it from PyPi.

git clone https://github.com/nanpy/nanpy-firmware.git
cd nanpy-firmware
./configure.sh
You can now edit Nanpy/cfg.h generated file to configure your Nanpy firmware, selecting the features you want to include and the baud rate.
To build and install Nanpy firmware, copy Nanpy directory under your "sketchbook" directory, start your Arduino IDE, open Sketchbook -> Nanpy and click on "Upload".

To install Nanpy Python library on your master device just type:

pip install nanpy

To uninstall:

pip uninstall nanpy

To install the latest version from Github:

pip install https://github.com/nanpy/nanpy/archive/master.zip

How to contribute

Nanpy still needs a lot of work. You can contribute with patches (bugfixing, improvements, adding support for a new library not included in Nanpy yet, writing examples and so on), writing documentation, reporting bugs, creating packages or simply spreading Nanpy through the web if you like it :) If you have any doubt or problem, please contact me at [email protected]

Do you want to support us with a coffee? We need a lot of caffeine to code all night long! if you like this project and you want to support us, please donate using Paypal

Bug reports

  • try the blink.py example
  • try to test the function without Nanpy, using only Arduino code. If the problem remains then it is not a Nanpy bug.
  • enable logging: import logging;logging.basicConfig(level=logging.DEBUG)
  • attach the log messages
  • attach your program. The program should be as small as possible which demonstrates the bug.
  • check cfg.h. All needed functions are enabled?
  • Run examples/firmware_check.py to check cfg.h again. All needed functions are listed?
  • attach your cfg.h
  • describe your hardware

Supported hardware

board:
  • ATmega boards (ATtiny has not enough RAM)
  • ESP8266 (communication over serial or WiFi connection)
external hardware:
  • BMP180 Digital pressure sensor
  • AD9850 Direct Digital Synthesizer
  • TLC5947 LED Driver
  • DHT11, DHT22, DHT21, AM2301 humidity sensors
  • HD44780 LCD controller
  • PCF8574 8-Bit I/O Expander for I2C
  • X9C1xxx (xxx = 102,103,104,503) digital potentiometers
  • HC-SR04 (ultrasonic sensor)
internal hardware:
  • counter, frequency measurement
  • PWM (advanced PWM functions are hardcoded for Uno compatible boards)
  • ADC
  • I2C
  • read, write RAM
  • read, write EEPROM
  • read, write all registers
  • tone()

License

This software is released under MIT License. Copyright (c) 2012-2016 Andrea Stagi [email protected]

nanpy-firmware's People

Contributors

astagi avatar balzreber avatar egarris2 avatar graemian avatar hegartybr avatar michalopler avatar ololobus avatar ponty avatar scottdky avatar strykaizer 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  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

nanpy-firmware's Issues

Error uploading Sketchbook/Nanpy to Arduino UNO

Getting this error kindly check and reply ASAP

Nanpy/freeram.c.o: In function free_ram3': /home/pi/sketchbook/libraries/Nanpy/freeram.c:53: multiple definition of free_ram1'
freeram.c.o:freeram.c:53: first defined here
Nanpy/freeram.c.o: In function free_ram3': /home/pi/sketchbook/libraries/Nanpy/freeram.c:64: multiple definition of free_ram2'
freeram.c.o:freeram.c:64: first defined here
Nanpy/freeram.c.o: In function free_ram3': /home/pi/sketchbook/libraries/Nanpy/freeram.c:64: multiple definition of free_ram3'
freeram.c.o:freeram.c:64: first defined here
Nanpy/RAMClass.cpp.o: In function nanpy::RAMClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/RAMClass.cpp:15: multiple definition of nanpy::RAMClass::get_firmware_id()'
RAMClass.cpp.o:RAMClass.cpp:15: first defined here
Nanpy/RAMClass.cpp.o: In function nanpy::RAMClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/RAMClass.cpp:19: multiple definition of nanpy::RAMClass::elaborate(nanpy::MethodDescriptor*)'
RAMClass.cpp.o:RAMClass.cpp:19: first defined here
Nanpy/DefineClass.cpp.o: In function nanpy::DefineClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/DefineClass.cpp:67: multiple definition of nanpy::DefineClass::get_firmware_id()'
DefineClass.cpp.o:DefineClass.cpp:67: first defined here
Nanpy/DefineClass.cpp.o: In function nanpy::DefineClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/DefineClass.cpp:100: multiple definition of nanpy::DefineClass::elaborate(nanpy::MethodDescriptor*)'
DefineClass.cpp.o:DefineClass.cpp:100: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:158: multiple definition of nanpy::ComChannel::connect()'
ComChannel.cpp.o:ComChannel.cpp:158: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:158: multiple definition of nanpy::ComChannel::println(String&)'
ComChannel.cpp.o:ComChannel.cpp:158: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(char const*)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(int)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(unsigned int)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(float)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(double)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(long)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::println(unsigned long)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of readLineFromSerial(char*)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:158: multiple definition of nanpy::ComChannel::read_buffer'
ComChannel.cpp.o:ComChannel.cpp:158: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::readLine(char*)'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/ComChannel.cpp.o: In function nanpy::ComChannel::available()': /home/pi/sketchbook/libraries/Nanpy/ComChannel.cpp:162: multiple definition of nanpy::ComChannel::available()'
ComChannel.cpp.o:ComChannel.cpp:162: first defined here
Nanpy/WireClass.cpp.o: In function nanpy::WireClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/WireClass.cpp:15: multiple definition of nanpy::WireClass::get_firmware_id()'
WireClass.cpp.o:WireClass.cpp:15: first defined here
Nanpy/WireClass.cpp.o: In function nanpy::WireClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/WireClass.cpp:34: multiple definition of nanpy::WireClass::elaborate(nanpy::MethodDescriptor*)'
WireClass.cpp.o:WireClass.cpp:34: first defined here
Nanpy/InfoClass.cpp.o: In function nanpy::InfoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/InfoClass.cpp:14: multiple definition of nanpy::InfoClass::get_firmware_id()'
InfoClass.cpp.o:InfoClass.cpp:14: first defined here
Nanpy/InfoClass.cpp.o: In function nanpy::InfoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/InfoClass.cpp:20: multiple definition of nanpy::InfoClass::elaborate(nanpy::MethodDescriptor*)'
InfoClass.cpp.o:InfoClass.cpp:20: first defined here
Nanpy/WatchdogClass.cpp.o: In function disable_watchdog_at_startup()': /home/pi/sketchbook/libraries/Nanpy/WatchdogClass.cpp:37: multiple definition of disable_watchdog_at_startup()'
WatchdogClass.cpp.o:WatchdogClass.cpp:37: first defined here
Nanpy/StepperClass.cpp.o: In function nanpy::StepperClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/StepperClass.cpp:15: multiple definition of nanpy::StepperClass::get_firmware_id()'
StepperClass.cpp.o:StepperClass.cpp:15: first defined here
Nanpy/StepperClass.cpp.o: In function nanpy::StepperClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/StepperClass.cpp:37: multiple definition of nanpy::StepperClass::elaborate(nanpy::MethodDescriptor*)'
StepperClass.cpp.o:StepperClass.cpp:37: first defined here
Nanpy/ArduinoClass.cpp.o: In function nanpy::ArduinoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ArduinoClass.cpp:11: multiple definition of nanpy::ArduinoClass::get_firmware_id()'
ArduinoClass.cpp.o:ArduinoClass.cpp:11: first defined here
Nanpy/ArduinoClass.cpp.o: In function nanpy::ArduinoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ArduinoClass.cpp:13: multiple definition of nanpy::ArduinoClass::elaborate(nanpy::MethodDescriptor*)'
ArduinoClass.cpp.o:ArduinoClass.cpp:13: first defined here
Nanpy/ArduinoCoreClass.cpp.o: In function nanpy::ArduinoCoreClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ArduinoCoreClass.cpp:18: multiple definition of nanpy::ArduinoCoreClass::get_firmware_id()'
ArduinoCoreClass.cpp.o:ArduinoCoreClass.cpp:18: first defined here
Nanpy/ArduinoCoreClass.cpp.o: In function nanpy::ArduinoCoreClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ArduinoCoreClass.cpp:38: multiple definition of nanpy::ArduinoCoreClass::elaborate(nanpy::MethodDescriptor*)'
ArduinoCoreClass.cpp.o:ArduinoCoreClass.cpp:38: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::MethodDescriptor()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::stack_pool_size'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::stack_pool'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::MethodDescriptor()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getNArgs()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getBool(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getInt(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getByte(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getFloat(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getDouble(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getString(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getClass()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getObjectId()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::getName()'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(String&)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(char const*)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(unsigned int)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(float)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(double)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(long)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/MethodDescriptor.cpp.o: In function nanpy::MethodDescriptor::returns(unsigned long)': /home/pi/sketchbook/libraries/Nanpy/MethodDescriptor.cpp:118: multiple definition of nanpy::MethodDescriptor::returns(unsigned long)'
MethodDescriptor.cpp.o:MethodDescriptor.cpp:118: first defined here
Nanpy/ServoClass.cpp.o: In function nanpy::ServoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ServoClass.cpp:15: multiple definition of nanpy::ServoClass::get_firmware_id()'
ServoClass.cpp.o:ServoClass.cpp:15: first defined here
Nanpy/ServoClass.cpp.o: In function nanpy::ServoClass::elaborate(nanpy::MethodDescriptor*)': /home/pi/sketchbook/libraries/Nanpy/ServoClass.cpp:42: multiple definition of nanpy::ServoClass::elaborate(nanpy::MethodDescriptor*)'
ServoClass.cpp.o:ServoClass.cpp:42: first defined here
Nanpy/BaseClass.cpp.o: In function _GLOBAL__sub_D__ZN5nanpy8Register7classesE': /home/pi/sketchbook/libraries/Nanpy/SlimArray.h:86: multiple definition of nanpy::Register::classes'
BaseClass.cpp.o:SlimArray.h:86: first defined here
collect2: error: ld returned 1 exit status

Unix only?

./configure.sh doesn't work in the Windows command prompt. I tried duplicating the sample cfg.h file and renaming it to cfg.h but I get a compile error when I try to Verify the sketch:

In file included from C:\Users\HCC_Admin\Documents\Arduino\nanpy-firmware-master\Nanpy\Nanpy.ino:1:0:
sketch\cfg_all.h:3:17: fatal error: cfg.h: No such file or directory
 #include "cfg.h"
             ^
compilation terminated.
exit status 1
Error compiling for board Arduino Duemilanove or Diecimila.

Uploading nanpy firmware for Arduino

I have problem with uploading firmware to Arduino. May be the way I try is wrong although I follow the instruction here https://github.com/nanpy/nanpy-firmware. Is there any other way to upload firmware to Arduino? I have tried the explanation here http://www.instructables.com/id/Arduino-Raspberry-Pi-Internet-Radio/?ALLSTEPS . It is really easy and working for me. But that version is version 0.7. Now I want to try for latest version. Can you show explain me the way to do it just simple way?

Nanpy firmware error

I am trying to install nanpy on an Arduino, and it gives me this error when I upload it:

aseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = DHT]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = CapacitiveSensor]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = LiquidCrystal_I2C]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = LiquidCrystal]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = DallasTemperature]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = Servo]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = Stepper]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = OneWire]':
Nanpy.ino:105: instantiated from here
BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.

The code uploads, but when I run any code, even the examples, the led blinks twice and then it gives me a serial timeout:

$python blink.py
Traceback (most recent call last):
File "blink.py", line 11, in
a = ArduinoApi(connection=connection)
File "build/bdist.macosx-10.9-intel/egg/nanpy/classinfo.py", line 22, in getinstance
File "build/bdist.macosx-10.9-intel/egg/nanpy/classinfo.py", line 59, in init
File "build/bdist.macosx-10.9-intel/egg/nanpy/memo.py", line 20, in call
File "build/bdist.macosx-10.9-intel/egg/nanpy/arduinoboard.py", line 57, in wrapper
File "build/bdist.macosx-10.9-intel/egg/nanpy/arduinoboard.py", line 125, in wrapper
File "build/bdist.macosx-10.9-intel/egg/nanpy/arduinoboard.py", line 47, in _call
File "build/bdist.macosx-10.9-intel/egg/nanpy/arduinoboard.py", line 16, in return_value
File "build/bdist.macosx-10.9-intel/egg/nanpy/serialmanager.py", line 98, in readline
nanpy.serialmanager.SerialManagerError: Serial timeout!

running on a macbook

firmware not compiled in sketch vers1.5.5-r2 (Windows 7)

Arduino: 1.5.5-r2 (Windows 7), Board: "Arduino Uno"

/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = DHT]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = CapacitiveSensor]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = LiquidCrystal]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = DallasTemperature]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = Servo]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = Stepper]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor_) [with T = OneWire]':
Nanpy.ino:98: instantiated from here
/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp: In member function 'virtual void nanpy::OneWireClass::elaborate(nanpy::MethodDescriptor_)':
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:18: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:24: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:27: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:42: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:47: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:57: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:65: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:67: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:72: error: invalid use of incomplete type 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/OneWireClass.h:7: error: forward declaration of 'struct OneWire'
C:\Program Files (x86)\Arduino\libraries\Nanpy/BaseClass.h: In member function 'void nanpy::ObjectsManager::elaborate(nanpy::MethodDescriptor*) [with T = OneWire]':
C:\Program Files (x86)\Arduino\libraries\Nanpy\OneWireClass.cpp:15: instantiated from here
C:\Program Files (x86)\Arduino\libraries\Nanpy/BaseClass.h:27: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Uploading firmware to Arduino micro

Hello!
We got the firmware and example sketch running for the Arduino Uno.
It works smoothly :)
Now we tried with the Arduino Micro, which we would be needing for our prototype, but cant upload the firmware to the micro. Have you heard of any issues before?
Error Message when uploading: http://codepad.org/NiDRZDIe

Any help would be much appreciated :)

Possible firmware issue

I'm by no means an expert in the programming field, I've just started with an Arduino getting a speech synth chip to work. When trying to load some code that imports nanpy I get the following readout

E:\python>python serial.py
Traceback (most recent call last):
File "serial.py", line 6, in
from nanpy import (arduinoapi, serial_manager)
File "E:\Python 3.5.1\lib\site-packages\nanpy-0.9.5-py3.5.egg\nanpy__init__.py", line 12, in
File "E:\Python 3.5.1\lib\site-packages\nanpy-0.9.5-py3.5.egg\nanpy\arduinoboard.py", line 1, in
File "E:\Python 3.5.1\lib\site-packages\nanpy-0.9.5-py3.5.egg\nanpy\serialmanager.py", line 3, in
File "E:\python\serial.py", line 6, in
from nanpy import (arduinoapi, serial_manager)
File "E:\Python 3.5.1\lib\site-packages\nanpy-0.9.5-py3.5.egg\nanpy\arduinoapi.py", line 1, in
ImportError: cannot import name 'arduinomethod'

The error is something to do with the arduinomethod(???) and I have no idea how I can fix the problem. Any help would be much appreciated.

Obtaining multiple addresses with DallasTemperature Class 'getAddress'

I am having trouble retrieving more than one address from the getAddress method.

I have two DS18B20's connected on Pin 10, at present getAddress() always returns the results from device 0. The getTempC method is working fine and receives the individual device readings, but I need to get the device address' for a transaction log.

I've tried to go through the firmware code however I am not overly familiar with C/C++..

Any pointers would be much appreciated!

Here's my python code.

from nanpy import DallasTemperature

sensors = DallasTemperature(10)
sensors.setResolution(9)
sensors.requestTemperatures()

for x in range(0, sensors.getDeviceCount()):
    temp = sensors.getTempC(x)
    addr = sensors.getAddress(x)
    print("This devices address is %s" % addr)
    print("The temperature, in Celsius degrees is %0.2f" % temp)

How to Use oneWire

Hello, Newbie on using Nanpy, how can i use oneWire library in my project. Thanks

supporting ARM

TODO:

  • Arduino 1.6 (ARM and AVR) build tests with travis
  • use #ifdef AVR for AVR specific code
  • rename AVR only files (example: counter_avr.cpp)
  • rename AVR only features (example: #define COUNTER_AVR 1)

Wire problem PCF8574

Hi,
Iv got Nanpy to do simple stuff such as moving motors and lighting LEDs (brilliant stuff btw ! ). Im trying to expand the IO ports of my Micro using a PCF8574 and i keep running into this error when i try the basic Demo program

>PCF8574 demo
address: 0x27
Traceback (most recent call last):
  File "PCF8574_demo.py", line 50, in <module>
    main()
  File "PCF8574_demo.py", line 15, in main
    pcf = PCF8574(a.wire, I2C_ADDRESS)
  File "/home/pi/Desktop/teststuff/nanpy/memo.py", line 20, in __call__
    value = self.func(*args)
  File "/home/pi/Desktop/teststuff/nanpy/arduinotree.py", line 141, in wire
    return Wire(self.connection)
  File "/home/pi/Desktop/teststuff/nanpy/classinfo.py", line 26, in getinstance
    (cls, cls_name))
nanpy.classinfo.FirmwareMissingFeatureError: <class 'nanpy.wire.Wire'> ['Wire'] is missing from firmware!

Any idea on what may be the problem ?
Thanks so much !

Refactoring and fixes needed in Nanpy core

Reported by Bartek Celary

char* readLineFromSerial()
{
    char* buffer = (char*)malloc(30);
    int i=0;
    char ch = '0';
    do {
        ch = Serial.read();
        if(ch != '\0' && ch < 255 && ch >= 0) {
            buffer[i++] = ch;
        }
    } while(ch != '\0');
    char* buffer2 = (char*)malloc(i + 1);
    buffer[i] = '\0';
    strcpy(buffer2, buffer);
    free(buffer);
    return buffer2;
};

I maybe misreading this but it looks to me there are 2 issues here. First: we can easily go beyond 30 chars and corrupt the memory (if there's no 0 char available from Rx), second performing 2nd malloc is not good for memory fragmentation.

cfg.h improvements

  • turn on some features in default config
  • missing #define should be the same as if it would be zero
  • console and/or GUI generator for beginners

does not link

/tmp/arduino-buildUaRLxc/sketch.cpp:1:17: error: cfg.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:49:23: error: BaseClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:50:26: error: ArduinoClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:51:26: error: OneWireClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:52:26: error: StepperClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:53:24: error: ServoClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:54:36: error: DallasTemperatureClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:55:32: error: LiquidCrystalClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:56:36: error: LiquidCrystalClass_I2C.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:57:35: error: CapacitiveSensorClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:58:23: error: ToneClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:59:30: error: MethodDescriptor.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:60:24: error: ComChannel.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:61:25: error: EEPROMClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:62:22: error: RAMClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:63:22: error: DHTClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:65:25: error: DefineClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:66:30: error: ArduinoCoreClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:67:27: error: WatchdogClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:68:27: error: RegisterClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:69:26: error: CounterClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:70:23: error: InfoClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:71:23: error: WireClass.h: No such file or directory
/tmp/arduino-buildUaRLxc/sketch.cpp:73: error: ‘nanpy’ is not a namespace-name
/tmp/arduino-buildUaRLxc/sketch.cpp:73: error: expected namespace-name before ‘;’ token
/tmp/arduino-buildUaRLxc/sketch.cpp:75: error: expected constructor, destructor, or type conversion before ‘*’ token
/tmp/arduino-buildUaRLxc/sketch.cpp: In function ‘void setup()’:
/tmp/arduino-buildUaRLxc/sketch.cpp:78: error: ‘disable_watchdog_at_startup’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:80: error: ‘ArduinoClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:80: error: ‘REGISTER_CLASS’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:82: error: ‘nanpy’ has not been declared
/tmp/arduino-buildUaRLxc/sketch.cpp:82: error: ‘USE_EEPROM’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:82: error: ‘REGISTER_CLASS_CONDITIONAL’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:83: error: ‘nanpy’ has not been declared
/tmp/arduino-buildUaRLxc/sketch.cpp:83: error: ‘USE_RAM’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:84: error: ‘LiquidCrystalClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:84: error: ‘USE_LiquidCrystal’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:85: error: ‘LiquidCrystalClass_I2C’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:85: error: ‘USE_LiquidCrystal_I2C’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:86: error: ‘OneWireClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:86: error: ‘USE_OneWire’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:87: error: ‘DallasTemperatureClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:87: error: ‘USE_DallasTemperature’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:88: error: ‘StepperClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:88: error: ‘USE_Stepper’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:89: error: ‘ServoClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:89: error: ‘USE_Servo’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:90: error: ‘ToneClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:90: error: ‘USE_Tone’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:91: error: ‘CapacitiveSensorClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:91: error: ‘USE_CapacitiveSensor’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:92: error: ‘DefineClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:92: error: ‘USE_Define’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:93: error: ‘ArduinoCoreClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:93: error: ‘USE_ArduinoCore’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:94: error: ‘WatchdogClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:94: error: ‘USE_Watchdog’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:95: error: ‘RegisterClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:95: error: ‘USE_Register’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:97: error: ‘CounterClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:97: error: ‘USE_Counter’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:98: error: ‘InfoClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:98: error: ‘USE_Info’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:99: error: ‘DHTClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:99: error: ‘USE_DHT’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:100: error: ‘WireClass’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:100: error: ‘USE_Wire’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:102: error: ‘ComChannel’ has not been declared
/tmp/arduino-buildUaRLxc/sketch.cpp: In function ‘void loop()’:
/tmp/arduino-buildUaRLxc/sketch.cpp:106: error: ‘ComChannel’ has not been declared
/tmp/arduino-buildUaRLxc/sketch.cpp:107: error: ‘m’ was not declared in this scope
/tmp/arduino-buildUaRLxc/sketch.cpp:107: error: expected type-specifier before ‘MethodDescriptor’
/tmp/arduino-buildUaRLxc/sketch.cpp:107: error: expected `;' before ‘MethodDescriptor’
/tmp/arduino-buildUaRLxc/sketch.cpp:108: error: ‘Register’ has not been declared
Linking...

/usr/share/arduino-1.0.5/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -o /tmp/arduino-buildUaRLxc/sketch.elf /tmp/arduino-buildUaRLxc/EEPROM/EEPROM.cpp.o /tmp/arduino-buildUaRLxc/Servo/Servo.cpp.o /tmp/arduino-buildUaRLxc/LiquidCrystal/LiquidCrystal.cpp.o /tmp/arduino-buildUaRLxc/Stepper/Stepper.cpp.o /tmp/arduino-buildUaRLxc/Wire/utility/twi.c.o /tmp/arduino-buildUaRLxc/Wire/Wire.cpp.o /tmp/arduino-buildUaRLxc/core.a -L/tmp/arduino-buildUaRLxc -lm
/tmp/arduino-buildUaRLxc/core.a(main.cpp.o): In function main': /usr/share/arduino-1.0.5/hardware/arduino/cores/arduino/main.cpp:11: undefined reference tosetup'
/usr/share/arduino-1.0.5/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop'

Link failed.

Error using the DHT library..

DHTClass.cpp: In member function ‘virtual void nanpy::DHTClass::elaborate(nanpy::MethodDescriptor*)’:
DHTClass.cpp:21:57: error: invalid use of incomplete type ‘class DHT’
dht = new DHT (m->getInt(0), m->getInt(1), m->getInt(2));
^
In file included from DHTClass.cpp:7:0:
DHTClass.h:7:7: error: forward declaration of ‘class DHT’
class DHT;
^
DHTClass.cpp:23:43: error: invalid use of incomplete type ‘class DHT’
dht = new DHT (m->getInt(0), m->getInt(1));
^
In file included from DHTClass.cpp:7:0:
DHTClass.h:7:7: error: forward declaration of ‘class DHT’
class DHT;
^
DHTClass.cpp:25:10: error: invalid use of incomplete type ‘class DHT’
dht->begin();
^
In file included from DHTClass.cpp:7:0:
DHTClass.h:7:7: error: forward declaration of ‘class DHT’
class DHT;
^
DHTClass.cpp:31:37: error: invalid use of incomplete type ‘class DHT’
m->returns(v[m->getObjectId()]->readHumidity());
^
In file included from DHTClass.cpp:7:0:
DHTClass.h:7:7: error: forward declaration of ‘class DHT’
class DHT;
^
DHTClass.cpp:35:37: error: invalid use of incomplete type ‘class DHT’
m->returns(v[m->getObjectId()]->readTemperature(m->getBool(0)));
^
In file included from DHTClass.cpp:7:0:
DHTClass.h:7:7: error: forward declaration of ‘class DHT’
class DHT;
^

Problem on LiquidiCrystalClass_I2C

I'm trying to upload nanpy-firmware to a Arduino UNO R3 following the instructions on nanpy.github.io, but...

`
Arduino: 1.8.3 (Linux), Board:"Arduino/Genuino Uno"

sketch/LiquidCrystalClass_I2C.cpp: In member function 'virtual void nanpy::LiquidCrystalClass_I2C::elaborate(nanpy::MethodDescriptor*)':
LiquidCrystalClass_I2C.cpp:32: error: 't_backlighPol' was not declared in this scope
(t_backlighPol)m->getInt(prm++))),
^
LiquidCrystalClass_I2C.cpp:33: error: no matching function for call to 'LiquidCrystal_I2C::begin(int, int)'
v[m->getObjectId()]->begin(m->getInt(prm++), m->getInt(prm++));
^
sketch/LiquidCrystalClass_I2C.cpp:33:74: note: candidate is:
In file included from sketch/LiquidCrystalClass_I2C.cpp:6:0:
~/Arduino/libraries/Arduino-LiquidCrystal-I2C-library-master/LiquidCrystal_I2C.h:76:7: note: void LiquidCrystal_I2C::begin()
void begin();
^
~/Arduino/libraries/Arduino-LiquidCrystal-I2C-library-master/LiquidCrystal_I2C.h:76:7: note: candidate expects 0 arguments, 2 provided
exit status 1
't_backlighPol' was not declared in this scope
`

Onewire.h Not Found

Hi, I am getting this error when uploading from my ubuntu 16.04 Arduino IDE

OneWireClass.cpp:5:21: fatal error: OneWire.h: No such file or directory
#include <OneWire.h>
^
compilation terminated.

Could you please assist me with this.

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.