more G-Labs products

Author Topic: Arduino and First Sketch  (Read 1262 times)

December 09, 2015, 05:31:41 PM
Read 1262 times

kb1ojr

  • *
  • Information
  • Newbie
  • Posts: 10
Hello all, I am having a problem with getting my first sketch to work with my PI and Arduino.
Here is my setup.

RaspberryPI 2
Raspbian "Jessie" OS (fresh install)
Homegenie installed (fresh install)

Once installed Homegenie according to documentation I did a apt-get install arduino, which also installed the arduino-core

From the home genie webpage I added a program according to documentation and called it Arduino sketch,
I copied and pasted code into the complier, and successfully complied the sketch to blink the light on the arduino. When I go to run I get the following error.



CR: ApplicationName='empty', CommandLine='-f -L uploadres.txt make upload', CurrentDirectory='/usr/local/bin/homegenie/programs/arduino/1000', Native error= Cannot find the specified file   Runtime
Error
11:29:01 AM   Block popup from this source

Error

Picture of the error I get
http://puu.sh/lPfcU/5458f9b512.png


December 09, 2015, 06:55:45 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
what is the content of the /usr/local/bin/homegenie/programs/arduino/1000 folder?
Try building/uploading from terminal:

- cd /usr/local/bin/homegenie/programs/arduino/1000
- make upload

perhaps you will need to change the folder permissions before doing this.

g.

December 09, 2015, 07:01:37 PM
Reply #2

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
oh... perhaps got what the issue is.
Please install the package empty:

Code: [Select]
sudo apt-get install empty-expect

Cheers,
g.

December 10, 2015, 02:04:34 AM
Reply #3

kb1ojr

  • *
  • Information
  • Newbie
  • Posts: 10
Well installing that package worked, however it says successful upload, but there looks to be some errors, such as not in sync. What is the file I can tail -f to view the logs during this upload?


December 10, 2015, 02:18:33 AM
Reply #4

kb1ojr

  • *
  • Information
  • Newbie
  • Posts: 10
I found that the problem was the "makefile" was pointing to ttyAMA0 when my Andruino was on ttyACM0, once I changed that I was able to successfully upload and make the light blink, but it only works for a second then I get a sync error again.


   Arduino.UploadOutput
stk500_getsync() attempt 8 of 10: not in sync: resp=0x00   
8:18:05 PM   Block popup from this source


Picture below in link

http://puu.sh/lPNJq/54e9ee24b1.png

December 10, 2015, 02:24:55 AM
Reply #5

kb1ojr

  • *
  • Information
  • Newbie
  • Posts: 10
I spoke too soon, I had commented out the board type. All works now thanks.