Code Monkey home page Code Monkey logo

Comments (14)

thias15 avatar thias15 commented on May 18, 2024 2

Also let me give a general recommendation for issues in open-source projects.

  1. Don't complain, be nice when asking for help. This is an open-source project. Nobody wants to help a complainer.
  2. Be specific about your error. Include screenshots, error logs, etc.
  3. If you feel things could be done better, improve them and send a pull request.

from openbot.

thias15 avatar thias15 commented on May 18, 2024

What error are you getting? You shouldn't need to comment anything.

from openbot.

thias15 avatar thias15 commented on May 18, 2024

Did you install the NewPing library?

from openbot.

crearo avatar crearo commented on May 18, 2024

+1 for @thias15 's comment. This is actually one of the best documented hardware+software+3D-printing projects I've seen on GitHub!

Apart from writing out what exactly your current setup is, write about your problem specifically.
Additionally, don't expect this project to have a start-from-scratch guide. If you're new, do you research on things you don't understand first.

from openbot.

Cantfigurethisout avatar Cantfigurethisout commented on May 18, 2024

Didn't mean to be a complainer, I apologize for sounding that way, just trying to identify an area that was lacking (everything else has been fairly well documented, or at least it is mentioned what needs to be done).

"You shouldn't need to comment anything." Don't you have to delete some of the hashtag things to make it work?

#if (OPENBOT == DIY)
#define PIN_PWM1 5
#define PIN_PWM2 6
#define PIN_PWM3 9
#define PIN_PWM4 10
#define PIN_SPEED_L 2
#define PIN_SPEED_R 3
#define PIN_VIN A7
#define PIN_TRIGGER 4
#define PIN_ECHO 4
#define PIN_LED_RL 7
#define PIN_LED_RR 8
#elif (OPENBOT == PCB)
#define PIN_PWM1 10
#define PIN_PWM2 9
#define PIN_PWM3 5
#define PIN_PWM4 6
#define PIN_SPEED_L 2
#define PIN_SPEED_R 4
#define PIN_VIN A7
#define PIN_TRIGGER 3
#define PIN_ECHO 3
#define PIN_LED_RL 7
#define PIN_LED_RR 8
#endif

As far as errors go I got a lot, need to spend more time with it to make sure I am not doing anything dumb. Not intending to ask for help yet on fixing my setup, like I said noticed an area that was lacking and wanted to point it out.

If I was going to complain I would start with not being able to print on my ender 3 because the dimensions of the car are too big. My solution for this sucked and I want to re-do it, if that is halfway decent I will post it so others with a smaller print volume can use it as well.

from openbot.

parixit avatar parixit commented on May 18, 2024

Those aren't comments. These are comments:
// ---------------------------------------------------------------------------
// This Arduino sketch accompanies the OpenBot Android application.
//
// The sketch has the following functinonalities:
// - receive control commands from Android application (USB serial)
//. - produce low-level controls (PWM) for the vehicle
// - toggle left and right indicator signals
// - wheel odometry based on optical speed sensors
// - estimate battery voltage via voltage divider
// - estimate distance based on sonar sensor
// - send sensor readings to Android application (USB serial)
//
// Dependencies (if sonar is required):
// - NewPing library by Tim Eckel (Install via Tools --> Manage Libraries)
//
// By Matthias Mueller, Intelligent Systems Lab, 2020
// ---------------------------------------------------------------------------

// PIN_PWM1,PIN_PWM2,PIN_PWM3,PIN_PWM4 Low-level control of left DC motors via PWM
// PIN_SPEED_L, PIN_SPEED_R Measure left and right wheel speed
// PIN_VIN Measure battery voltage via voltage divider
// PIN_TRIGGER Arduino pin tied to trigger pin on ultrasonic sensor.
// PIN_ECHO Arduino pin tied to echo pin on ultrasonic sensor.
// MAX_DISTANCE Maximum distance we want to ping for (in centimeters).
// PIN_LED_RL, PIN_LED_RR Toggle left and right rear LEDs (indicator signals)

//------------------------------------------------------//
//DEFINITIONS
//------------------------------------------------------//

from openbot.

thias15 avatar thias15 commented on May 18, 2024

@Cantfigurethisout What you posted are the pin definitions.

The only thing you may need to set is if you are using the DIY or the PCB version. If you are building the robot using the DIY instructions just leave as it is:

// Setup the OpenBot version
#define OPENBOT DIY

If you are using the PCB then change it to:

#define OPENBOT PCB

What is the size of the build plate on your 3D printer?

from openbot.

thias15 avatar thias15 commented on May 18, 2024

@Cantfigurethisout I just merged a PR that adds a flag to disable the sonar. Try setting HAS_SONAR 0. This will remove compile errors related to not installing the NewPing library.

from openbot.

thias15 avatar thias15 commented on May 18, 2024

@Cantfigurethisout any updates?

By the way check out the new slim model. Top and bottom both fit on a 220mmx220mm build plate. If this is still too big, check out the glueable model.

from openbot.

Cantfigurethisout avatar Cantfigurethisout commented on May 18, 2024

Haven't gotten back to this. I saw the slim model, however my build volume is 200x200 (I hear this can be increased with open source firmware on my printer however I haven't gotten to that yet). Didn't see the glueable model, I will look for that. Thanks

from openbot.

Cantfigurethisout avatar Cantfigurethisout commented on May 18, 2024

Ok, I tried again, enabled Verbose logging so if this is too much, I apologize. Copied error code:

Arduino: 1.8.13 (Windows 10), Board: "Arduino NANO 33 IoT"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\jresp\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\jresp\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\jresp\OneDrive\Documents\Arduino\libraries -fqbn=arduino:samd:nano_33_iot -vid-pid=2341_8057 -ide-version=10813 -build-path C:\Users\jresp\AppData\Local\Temp\arduino_build_869510 -warnings=none -build-cache C:\Users\jresp\AppData\Local\Temp\arduino_cache_836998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.bossac.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.CMSIS.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.openocd.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -verbose C:\Users\jresp\Downloads\OpenBot-master\firmware\openbot_v1_nano\openbot_v1_nano.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\jresp\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\jresp\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\jresp\OneDrive\Documents\Arduino\libraries -fqbn=arduino:samd:nano_33_iot -vid-pid=2341_8057 -ide-version=10813 -build-path C:\Users\jresp\AppData\Local\Temp\arduino_build_869510 -warnings=none -build-cache C:\Users\jresp\AppData\Local\Temp\arduino_cache_836998 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.bossac.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.CMSIS.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.openocd.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -verbose C:\Users\jresp\Downloads\OpenBot-master\firmware\openbot_v1_nano\openbot_v1_nano.ino

Using board 'nano_33_iot' from platform in folder: C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8

Using core 'arduino' from platform in folder: C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8

Detecting libraries used...

"C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino NANO 33 IoT"" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\cores\arduino" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\variants\nano_33_iot" "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\sketch\openbot_v1_nano.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for NewPing.h: [[email protected]]

ResolveLibrary(NewPing.h)

-> candidates: [[email protected]]

"C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino NANO 33 IoT"" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\cores\arduino" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\variants\nano_33_iot" "-IC:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing\src" "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\sketch\openbot_v1_nano.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

"C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino NANO 33 IoT"" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\cores\arduino" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\variants\nano_33_iot" "-IC:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing\src" "C:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing\src\NewPing.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

WARNING: library NewPing claims to run on avr, arm architecture(s) and may be incompatible with your current board which runs on samd architecture(s).

Generating function prototypes...

"C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino NANO 33 IoT"" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\cores\arduino" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\variants\nano_33_iot" "-IC:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing\src" "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\sketch\openbot_v1_nano.ino.cpp" -o "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\preproc\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\preproc\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER="Arduino LLC"" "-DUSB_PRODUCT="Arduino NANO 33 IoT"" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\cores\arduino" "-IC:\Users\jresp\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.8\variants\nano_33_iot" "-IC:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing\src" "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\sketch\openbot_v1_nano.ino.cpp" -o "C:\Users\jresp\AppData\Local\Temp\arduino_build_869510\sketch\openbot_v1_nano.ino.cpp.o"

C:\Users\jresp\Downloads\OpenBot-master\firmware\openbot_v1_nano\openbot_v1_nano.ino: In function 'void loop()':

openbot_v1_nano:161:11: error: 'class NewPing' has no member named 'ping_timer'; did you mean 'ping_trigger'?

 sonar.ping_timer(echoCheck);  // Send out the ping, calls "echoCheck" function every 24uS where you can check the ping status.

       ^~~~~~~~~~

       ping_trigger

C:\Users\jresp\Downloads\OpenBot-master\firmware\openbot_v1_nano\openbot_v1_nano.ino: In function 'void echoCheck()':

openbot_v1_nano:353:13: error: 'class NewPing' has no member named 'check_timer'

if (sonar.check_timer()) { // Check ping status

         ^~~~~~~~~~~

openbot_v1_nano:354:25: error: 'class NewPing' has no member named 'ping_result'; did you mean 'ping_median'?

 distance_cm = sonar.ping_result / US_ROUNDTRIP_CM; // Ping returned in uS, convert to cm.

                     ^~~~~~~~~~~

                     ping_median

Using library NewPing at version 1.9.1 in folder: C:\Users\jresp\OneDrive\Documents\Arduino\libraries\NewPing

exit status 1

'class NewPing' has no member named 'ping_timer'; did you mean 'ping_trigger'?

from openbot.

thias15 avatar thias15 commented on May 18, 2024

The board name should be just "Arduino NANO". There also seems to be an issue with your NewPing library installation.
Did you try to disable the sonar, by setting HAS_SONAR = 0?

from openbot.

Cantfigurethisout avatar Cantfigurethisout commented on May 18, 2024

I have a sonar so wanted to keep it. will try to disable it and see how that works

from openbot.

Cantfigurethisout avatar Cantfigurethisout commented on May 18, 2024

It worked, got the wheels spinning. Thanks for the help.

from openbot.

Related Issues (20)

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.