Cuteduino

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Cuteduino

Postby azlanrp » Sun Dec 13, 2015 6:25 pm

Hi,

I just bought a cuteduino board and managed to upload my sketches couple of times. However during my last attempt to upload the program the system seems to be "hang" stopped at "running digispark uploader" " plug in device now". The pwr led at the cuteduino lighted but when i removed the usb cable to the cuteduino couple of times the uploading bar does not move. Hope somebody can help this newbie. Thank you.
Attachments
Screen Shot 2015-12-13 at 18.15.07.png
azlanrp
Freshie
 
Posts: 5
Joined: Thu Nov 19, 2015 11:09 am

Re: Cuteduino

Postby Idris » Mon Dec 14, 2015 11:20 am

Hi azlanrp,

From your sentence "managed to upload my sketches couple of times", is it mean you have succesfully upload the code to Cuteduino several times?

Do you connect Cuteduino to any external hardware? If so, could you share your hardware setup with clear wiring connection.

For the time being, maybe you can test the Cuteduino with other Windows PC/laptop.

Thanks.
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Cuteduino

Postby azlanrp » Mon Dec 14, 2015 8:28 pm

Hi Idris,

Thank you for the reply.

Yes i managed to upload the programs / sketches couple of times using Apple OS. It went well but i think i have problem with the codes. Because of that i reduced the codes to check where did i went wrong. Now i have only one input LDR on pin 0 and RELAY as output on pin 1. Please see attachment. In my earlier attempt i uploaded the program using usbserial port. However in my last attempt i kinda of lost the port and only have bluetooth-incoming-port and iPhone-WirelessiAP ports.

Sorry i do not have window based apparatus. As such i could not try it on other OS/window. I do hope the above is clear and appreciate your reply.
Attachments
Screen Shot 2015-12-14 at 19.57.49.png
Screen Shot 2015-12-14 at 20.26.59.png
azlanrp
Freshie
 
Posts: 5
Joined: Thu Nov 19, 2015 11:09 am

Re: Cuteduino

Postby azlanrp » Mon Dec 14, 2015 8:37 pm

Hi,

Anybody knows how to convert simple argument for cuteduino

if (ldr=low) and (val>840) and (val<910)
where ldr is output of photoresistor
Val is battery voltage

I read the manual and can only find the following code
if (one argument) else if (one argument)

The above is rather difficult to construct.
azlanrp
Freshie
 
Posts: 5
Joined: Thu Nov 19, 2015 11:09 am

Re: Cuteduino

Postby Idris » Tue Dec 15, 2015 9:29 am

Hi azlanrp, thanks for sharing the photos.

From the hardware setup, it looks like you are using Vin, pin 3 (D-), pin 1, pin 0 and GND. Right?

For your information, Cuteduino is using pin 3 (D-) and pin 4 (D+/A2) for USB communication. When you connect these pins to any external hardware, it will disturb the USB communication, so that is one of the reason why your Macbook can't detect the Cuteduino.

Another advise, please do your wiring properly. From the photo you share, the possibility the Cuteduino's pin to short is high. You can use jumper like this to do connection.

About the coding, Cuteduino don't support standard Serial functions, so please remove Serial.begin(9600).
CODE: SELECT_ALL_CODE
// Standby battery charger
int LDR = 0;
int RELAY = 1;

void setup()
{
  pinMode(LDR, INPUT);
  pinMode(RELAY, OUTPUT);
}

void loop()
{
  if(digitalRead(LDR) == LOW)
  {
    digitalWrite(RELAY, HIGH);
    delay(2000); // Put more delay for relay change state
    digitalWrite(RELAY, LOW);
    delay(2000);
  }
}

If you want to combine more condition in if statement, you can write like this.
CODE: SELECT_ALL_CODE
Val = analogRead(A1); // Cuteduino pin 2
if(digitalRead(LDR) == LOW && Val > 840 && Val < 910)
{
}

Or you can write like this.
CODE: SELECT_ALL_CODE
Val = analogRead(A1); // Cuteduino pin 2
if(digitalRead(LDR) == LOW)
{
  if(Val > 840 && Val < 910)
  {
  }
}
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Cuteduino

Postby azlanrp » Tue Dec 15, 2015 9:58 pm

Hi,
Currently i connected pin 0 and 1 only. I have removed any connection to pin 3 and pin 4.
Thank you for the advice on codes and jumper. I will use the jumpers soon.
I still fail to upload the program although i have hardwares connected to pin 0 and 1 no connection to pin 3 and 4.
I change to Arduino 1.6.6 - upload fail.
I revert to Arduino 1.6.5 and reload cuteduino board - upload fail
I reinstall ftdichip for Vcom couple of times - upload fail
I check at port - there is no usb serial only bluetooth and wireless as before.
I am now stumped as i could not upload any program either via cuteduino or ct uno.
Please assist.
azlanrp
Freshie
 
Posts: 5
Joined: Thu Nov 19, 2015 11:09 am

Re: Cuteduino

Postby Idris » Wed Dec 16, 2015 9:09 am

Hi azlanrp,

Maybe your Cuteduino bootloader have corrupted. You can follow this tutorial to repair the bootloader.
http://tutorial.cytron.com.my/2014/10/1 ... ootloader/

Thanks.
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Cuteduino

Postby ober » Wed Dec 16, 2015 9:29 am

azlanrp WROTE:Hi,
Currently i connected pin 0 and 1 only. I have removed any connection to pin 3 and pin 4.
Thank you for the advice on codes and jumper. I will use the jumpers soon.
I still fail to upload the program although i have hardwares connected to pin 0 and 1 no connection to pin 3 and 4.
I change to Arduino 1.6.6 - upload fail.
I revert to Arduino 1.6.5 and reload cuteduino board - upload fail
I reinstall ftdichip for Vcom couple of times - upload fail
I check at port - there is no usb serial only bluetooth and wireless as before.
I am now stumped as i could not upload any program either via cuteduino or ct uno.
Please assist.

Hi azlanrp,

I am confused because earlier discussion is about CuteDuino, but suddenly CT-UNO come into the picture.

Let's be clear that though both CuteDuino and CT-UNO is Arduino compatible, they are both different controller and require different drivers.

CuteDuino use special USB driver from DigiSpark, there is no COM port if you use CuteDuino, instead you will see DigiSpark Bootloader under device manager. And of course the USB detect /undetect sound from Windows, that is on Windows :) MAC should have similar settings, you just need to know where to get it.

CT-UNO uses FTDI driver, it will appears as COM Port under Device Manager and the USB detect / undetect sound will still be there when you plug and unplug. Without the sound, it is either the driver is not install properly or USB connection problem.

We do not have MAC here and are not familiar with MAC, so cannot really show you the exact method, but there are few recommendation.
- Check our the FTDI driver installation Guide for MAC
- Since you have CT-UNO, focus on it first. You can continue with CuteDuino later.
- If you see Vcom after CT-UNO is connected and driver installed, then you are good at the driver installation.
- Use Arduino IDE 1.6.6, choose Arduino UNO/Genuino under board and choose the correct COM number, try unloading simple LED blinking program.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Cuteduino

Postby azlanrp » Wed Dec 16, 2015 9:07 pm

Hi Idris,

Thank you on the recommendation on boot loader repair.

Hi Ober,

Yes i am talking about Cuteduino. But there seems to be no real answer on how to sort out this problem, i need to try everything possible. Therefore I reinstalled Arduino 1.6.5 then tried 1.6.6 then revert to 1.6.5 then reinstalled cuteduino. (please note i have ct uno first and later i bought cuteduino). I also reinstalled many times FTDI driver for MAC but to no avail. Hmmm as of yesterday nite nothing works.

Thank you both and i will let you know if all the above helps.
azlanrp
Freshie
 
Posts: 5
Joined: Thu Nov 19, 2015 11:09 am


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 10 guests