Go Down

Topic: how to write Japanese characters ? (Read 1 time) previous topic - next topic

gilou

Sep 24, 2012, 08:46 pm Last Edit: Sep 24, 2012, 08:48 pm by gilou Reason: 1
Hi everyone,

i am from Switzerland, 30 years old, and i have an arduino

i use it for my Daft punk helmet leds and i want to write Japanese characters but i dont know if it is possible and how to do it, i try writting it in my sketch but when i load it there is nothing showing in the leds...

i use the arduino 0.22.

do i have to check the options ?, is it the arduino itself ? do i need a special programm ?

Thanks

BulletMagnet83

You may need to post your code and an example of what you're trying to do :)

gilou

#2
Sep 24, 2012, 11:00 pm Last Edit: Sep 24, 2012, 11:03 pm by gilou Reason: 1
i am not a programmer, i use it because a friend told me how to use it, i am a real nub  :smiley-mr-green:

here is what i use as a code :

void animationinfo(int animation,int *maxframes,int *loops,int *framestart,int *DISPDELAY,int *typeanimation,int *background)
{switch(animation){          /* GG-DISPLAY */
case(0): //
       *DISPDELAY=0;
       *typeanimation=0;
       msg="      [font=Verdana]TOKYO[/font]";
       *background=1;
       break;  
i want to write the word "TOKYO" in japanese like this : ????? or ??.... but the problem is that i can save the sketch and upload it to my helmet and then ..nothing on the leds !


Runaway Pancake

Making a data array for Katakana is as easy as for Roman letters or anything else. 
Just plot out the points.
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

gilou

what do you mean to " plot out the points "  :smiley-red:


Far-seeker


what do you mean to " plot out the points "  :smiley-red:


Assuming this is an array of LEDs (I've never heard of "Daft punk"), you need determine which specific LEDs need to be on to form the shape of each Japanese character to be displayed.  Then store that information for each character you want to display either in the flash memory or EEPROM.  Once you have that you can write a function to convert a predetermined Latin alphabet a string to the proper Japanese characters and display them on the LED array.

gilou

#6
Sep 24, 2012, 11:53 pm Last Edit: Sep 24, 2012, 11:55 pm by gilou Reason: 1
oh my god... i can t do that

i am just a guy that use internet and emails, nothing else lol

here is the same model of the daft punk helmet that i have



is there nothing else more easy to do to write katakana  :~

Nick Gammon

Link to the helmet?

As you can see it has LEDs on it. You would need to work out the bit-patterns (dots) for the Japanese characters and send those. Just as an example, the letter "I" is a vertical bar of LEDs.
http://www.gammon.com.au/electronics

gilou

the arduino is inside the helmet and connected to the leds.

for example , do i have to change something here :

  *DISPDELAY=0;   
        *typeanimation=0;
        msg="      TOKYO";
        *background=1;
        break; 

or nothing to change here  :~

i can show you all the code if you want, but i don t know if it can be useful

Nick Gammon

What I want you to do is post a link (hyperlink) to the helmet in question so we can see the datasheet, or other descriptions about how it works.
http://www.gammon.com.au/electronics

Riva

Quote
i can show you all the code if you want, but i don t know if it can be useful

There will be clues in the code as to how it works so post it all if you can. Looking at videos of a helmet in action and it can do most any types of LED pattern so probably not relying on fonts built into LED controller chips. Changing the font from Latin to Katakana should be possible.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

gilou

i will post all the code later today. thanks everyone for your help  :)

gilou

here is the code  ( half of it, i cant post more than 9500 words)

// comment out this line for the 8x32 display;
//#define _16x24_

#include <WPROGRAM.H>
#include "ht1632.h"
#include <AVR/pgmspace.h>
#include "myfont.h"
#include "font3.h"

#ifdef _16x24_
 #define X_MAX 23
 #define Y_MAX 15
#else
 #define X_MAX 31
 #define Y_MAX 7
#endif

//(fc) switched to a different set of pins than the original, to accomodate the SD shield;
#define HT1632_DATA     6    // Data pin (pin 7)
#define HT1632_WRCLK    7    // Write clock pin (pin 5)
#define HT1632_CS       8    // Chip Select (1, 2, 3, or 4)

#define plot(x,y,v)  ht1632_plot(x,y,v)
#define cls          ht1632_clear
int DISPDELAY=0;
int frame = 0;
int n=0;
int loops=0;
int maxframes=0;
int framestart=0;
int typeanimation=0;
char *msg="Hola Mundo";
int crtPos = 0;
int background=1;
int animCounter = 0;  //(tek)
#define MAXANIMATIONS 14

// Read Resistance Values from Pin 2  (tek)
int potPin = 3;    // select the input pin for the multi-position switch
int potVal = 0;    // value of the potentiometer reading
int btnPos = 1;    // position of the multi state button

void ht1632_chipselect(byte chipno)
{
 DEBUGPRINT("\nHT1632(%d) ", chipno);
 digitalWrite(chipno, 0);
}

void ht1632_chipfree(byte chipno)
{
 DEBUGPRINT(" [done %d]", chipno);
 digitalWrite(chipno, 1);
}
/*
*/
// (fc) covers the case for 32x8 as well (64 bytes, 4 bits)
byte ht1632_shadowram[96];  // our copy of the display's RAM
*/
void ht1632_writebits (byte bits, byte firstbit)
{
 DEBUGPRINT(" ");
 while (firstbit) {
   DEBUGPRINT((bits&firstbit ? "1" : "0"));
   digitalWrite(HT1632_WRCLK, LOW);
   if (bits & firstbit) {
     digitalWrite(HT1632_DATA, HIGH);
   }
   else {
     digitalWrite(HT1632_DATA, LOW);
   }
   digitalWrite(HT1632_WRCLK, HIGH);
   firstbit >>= 1;
 }
}

/*
* ht1632_sendcmd
* Send a command to the ht1632 chip.
* A command consists of a 3-bit "CMD" ID, an 8bit command, and
* one "don't care bit".
*   Select 1 0 0 c7 c6 c5 c4 c3 c2 c1 c0 xx Free
*/
static void ht1632_sendcmd (byte command)
{
 ht1632_chipselect(HT1632_CS);  // Select chip
 ht1632_writebits(HT1632_ID_CMD, 1<<2);  // send 3 bits of id: COMMMAND
 ht1632_writebits(command, 1<<7);  // send the actual command
 ht1632_writebits(0, 1);    /* one extra dont-care bit in commands. */
 ht1632_chipfree(HT1632_CS); //done
}


*/
void ht1632_clear()
{
 char i;

 ht1632_chipselect(HT1632_CS);  // Select chip
 ht1632_writebits(HT1632_ID_WR, 1<<2);  // send ID: WRITE to RAM
 ht1632_writebits(0, 1<<6); // Send address
 for (i = 0; i < 96/2; i++) // Clear entire display
   ht1632_writebits(0, 1<<7); // send 8 bits of data
 ht1632_chipfree(HT1632_CS); // done
 for (i=0; i < 96; i++)
   ht1632_shadowram = 0;
}

/*

*/
static void ht1632_senddata (byte address, byte data)
{
 ht1632_chipselect(HT1632_CS);  // Select chip
 ht1632_writebits(HT1632_ID_WR, 1<<2);  // send ID: WRITE to RAM
 ht1632_writebits(address, 1<<6); // Send address
 ht1632_writebits(data, 1<<3); // send 4 bits of data
 ht1632_chipfree(HT1632_CS); // done
}

void ht1632_setup()
{
 pinMode(HT1632_CS, OUTPUT);
 digitalWrite(HT1632_CS, HIGH);    // unselect (active low)
 pinMode(HT1632_WRCLK, OUTPUT);
 pinMode(HT1632_DATA, OUTPUT);
 ht1632_sendcmd(HT1632_CMD_SYSDIS);  // Disable system

#ifdef _16x24_
 ht1632_sendcmd(HT1632_CMD_COMS11);  // 16*32, PMOS drivers
#else
// (fc)
 ht1632_sendcmd(HT1632_CMD_COMS10);  // 32x8, PMOS drivers
#endif

 ht1632_sendcmd(HT1632_CMD_MSTMD);    // Master Mode
 ht1632_sendcmd(HT1632_CMD_SYSON);    // System on
 ht1632_sendcmd(HT1632_CMD_LEDON);    // LEDs on

 for (byte i=0; i<64; i++)
   ht1632_senddata(i, 0);  // clear the display!

 delay(100);  // ?
}


/*

*/
void ht1632_plot (int x, int y, char val)
{
 if (x<0 || x>X_MAX || y<0 || y>Y_MAX)
    return;

 char addr, bitval;
  */
 bitval = 8>>(y&3);  // compute which bit will need set

#ifdef _16x24_
 addr = (x<<2) + (y>>2);  // compute which memory word this is in
#else
// (fc)
 addr = (x<<1) + (y>>2);  // compute which memory word this is in
#endif

 if (val) {  // Modify the shadow memory
   ht1632_shadowram[addr] |= bitval;
 }
 else {
   ht1632_shadowram[addr] &= ~bitval;
 }
 // Now copy the new memory value to the display
 ht1632_senddata(addr, ht1632_shadowram[addr]);
}

/*
* get_shadowram
* return the value of a pixel from the shadow ram.
*/
byte get_shadowram(byte x, byte y)
{
 byte addr, bitval;

 bitval = 8>>(y&3);  // compute which bit will need set
 addr = (x<<2) + (y>>2);  // compute which memory word this is in
 return (0 != (ht1632_shadowram[addr] & bitval));
/*
*/
void snapshot_shadowram()
{
 for (char i=0; i< sizeof ht1632_shadowram; i++) {
   ht1632_shadowram = (ht1632_shadowram & 0x0F) | ht1632_shadowram << 4;  // Use the upper bits

byte get_snapshotram(byte x, byte y)
{
 byte addr, bitval;

 bitval = 128>>(y&3);  // user upper bits!

#ifdef _16x24_
 addr = (x<<2) + (y>>2);  // compute which memory word this is in
#else
// (fc)
 addr = (x<<1) + (y>>2);  // compute which memory word this is in
#endif

 if (ht1632_shadowram[addr] & bitval)
   return 1;
 return 0;
}

void ht1632_putchar(int x, int y, char c,int background)
{
 // fonts defined for ascii 32 and beyond (index 0 in font array is ascii 32);
 byte charIndex;

 // replace undisplayable characters with blank;
 if (c < 32 || c > 126)
 {
   charIndex = 0;
 }
 else
 {
   charIndex = c - 32;
 }

 // move character definition, pixel by pixel, onto the display;
 // fonts are defined as one byte per row;
 for (byte row=0; row<8; row++)
 {
   byte rowDots = pgm_read_byte_near(&font3[charIndex][row]);
   
   for (byte col=0; col<6; col++)
   {
     if (rowDots & (1<<(5-col)))
       plot(x+col, y+row, 1*background);
     else
       plot(x+col, y+row, (1*background+1)%2);
   }
 }
}
void animationinfo(int animation,int *maxframes,int *loops,int *framestart,int *DISPDELAY,int *typeanimation,int *background)
{switch(animation){          /* GG-DISPLAY */
case(0): //
       *DISPDELAY=0;
       *typeanimation=0;
       msg="      TOKYO";
       *background=1;
       break;  
case(1):*maxframes=62; //llena-vacia
       *DISPDELAY=0;
       *framestart=9;
       *loops=1;
       *typeanimation=1;
       break;
case(2): //ROBOT HUMAN
       *DISPDELAY=0;
       *typeanimation=0;
       msg="      ROBOT      HUMAN";
       *background=1;
       break;
case(3): //DAFT PUNK
       *DISPDELAY=0;
       *typeanimation=0;
       msg="      DAFT PUNK";
       *background=1;
       break;
case(4):*maxframes=9; //ecualizador
       *DISPDELAY=50;
       *framestart=0;
       *loops=5;
       *typeanimation=1;
       break;

case(5):*maxframes=61; //kit
       *DISPDELAY=0;
       *framestart=106;
       *loops=2;
       *typeanimation=1;
       break;
 }}

/*
* This works equally well for both 16x24 and 8x32 matrices.
*/
 {
 for(n=0;n<loops;n++)
 {
 for(frame=0;frame<maxframes;frame++)
 {

 for (byte row=0; row<32; row++)
 {  byte rowDots = pgm_read_byte_near(&myfont[frame+framestart][row]);
   
   for (byte col=0; col<8; col++)
   {
     if (rowDots & (1<<(7-col)))
       plot(row, col, 1);
     else
       plot(row, col, 0);
   }
 }
 delay(DISPDELAY);

}}}
else
{ while(1)
{
 // shift the whole screen 6 times, one column at a time;  
 for (int x=0; x < 6; x++)  
 {  
   ht1632_putchar(-x, 0, msg[crtPos],background);  
   ht1632_putchar(-x+6,  0, ((crtPos+1 < strlen(msg)) ? msg[crtPos+1] : ' '),background);  
   ht1632_putchar(-x+12, 0, ((crtPos+2 < strlen(msg)) ? msg[crtPos+2] : ' '),background);  
   ht1632_putchar(-x+18, 0, ((crtPos+3 < strlen(msg)) ? msg[crtPos+3] : ' '),background);  
   ht1632_putchar(-x+24, 0, ((crtPos+4 < strlen(msg)) ? msg[crtPos+4] : ' '),background);  
   ht1632_putchar(-x+30, 0, ((crtPos+5 < strlen(msg)) ? msg[crtPos+5] : ' '),background);  
   ht1632_putchar(-x+36, 0, ((crtPos+6 < strlen(msg)) ? msg[crtPos+6] : ' '),background);  
   delay(DISPDELAY);  
 }  
 
 crtPos++;  
 if (crtPos >= strlen(msg))  
 {  
crtPos = 0;
 break;

Far-seeker

Use code tags!  Then you could post all your code without being limited by the maximum characters or the formatting being changed.  To get code tags just click the little button with the "#" symbol on it.

gilou

some letters and numbers

define all ascii characters starting with 32 (blank);
unsigned char PROGMEM font3[95][8] = {
 {
   0x00,    // ________   blank (ascii 32)
   0x00,    // ________
   0x00,    // ________
   0x00,    // ________
   0x00,    // ________
   0x00,    // ________
   0x00,    // ________
   0x00     // ________
 
 },
#ifdef _16x24_
 {
   0x00,    // ________  0
   0x0C,    // ____XX__
   0x12,    // ___X__X_
   0x12,    // ___X__X_
   0x12,    // ___X__X_
   0x12,    // ___X__X_
   0x0C,    // ____XX__
   0x00,    // ________
 },
 {

#else  // 8x32
 {
   0x00,    // ________  0
   0x1C,    // ___XXX__
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  1
   0x0C,    // ____XX__
   0x1C,    // ___XXX__
   0x2C,    // __X_XX__
   0x0C,    // ____XX__
   0x0C,    // ____XX__
   0x1E,    // ___XXXX_
   0x00,    // ________
 },
 {
   0x00,    // ________  2
   0x1C,    // ___XXX__
   0x26,    // __X__XX_
   0x0C,    // ____XX__
   0x18,    // ___XX___
   0x30,    // __XX____
   0x3E,    // __XXXXX_
   0x00,    // ________
 },
 {
   0x00,    // ________  3
   0x3E,    // __XXXXX_
   0x06,    // _____XX_
   0x1C,    // ___XXX__
   0x06,    // _____XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  4
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x3E,    // __XXXXX_
   0x06,    // _____XX_
   0x06,    // _____XX_
   0x06,    // _____XX_
   0x00,    // ________
 },
 {
   0x00,    // ________  5
   0x3E,    // __XXXXX_
   0x30,    // __XX____
   0x3C,    // __XXXX__
   0x06,    // _____XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  6
   0x1C,    // ___XXX__
   0x20,    // __X_____
   0x3C,    // __XXXX__
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  7
   0x3E,    // __XXXXX_
   0x06,    // _____XX_
   0x0C,    // ____XX__
   0x18,    // ___XX___
   0x18,    // ___XX___
   0x18,    // ___XX___
   0x00,    // ________
 },
 {
   0x00,    // ________  8
   0x1C,    // ___XXX__
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x26,    // __X__XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  9
   0x1C,    // ___XXX__
   0x26,    // __X__XX_
   0x1E,    // ___XXXX_
   0x06,    // _____XX_
   0x26,    // __X__XX_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
#endif
 {
   0x00,    // ________  :
   0x00,    // ________
   0x0C,    // ____XX__
   0x0C,    // ____XX__
   0x00,    // ________
   0x0C,    // ____XX__
   0x0C,    // ____XX__
   0x00,    // ________
 },

 {
   0x00,    // ________   A
   0x1C,    // ___XXX__
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x3E,    // __XXXXX_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x00     // ________
 },
 {
   0x00,    // ________   B
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x3C,    // __XXXX__
   0x00     // ________
 },
 {
   0x00,    // ________   C
   0x1C,    // ___XXX__
   0x22,    // __X___X_
   0x20,    // __X_____
   0x20,    // __X_____
   0x22,    // __X___X_
   0x1C,    // ___XXX__
   0x00     // ________
 },
 {
   0x00,    // ________   D
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x3C,    // __XXXX__
   0x00     // ________
 },
 {
   0x00,    // ________   E
   0x3E,    // __XXXXX_
   0x20,    // __X_____
   0x3C,    // __XXXX__
   0x20,    // __X_____
   0x20,    // __X_____
   0x3E,    // __XXXXX_
   0x00     // ________
 },
 {
   0x00,    // ________   F
   0x3E,    // __XXXXX_
   0x20,    // __X_____
   0x3C,    // __XXXX__
   0x20,    // __X_____
   0x20,    // __X_____
   0x20,    // __X_____
   0x00     // ________
 },
 {
   0x00,    // ________  G
   0x1C,    // ___XXX__
   0x20,    // __X_____
   0x20,    // __X_____
   0x26,    // __X__XX_
   0x22,    // __X___X_
   0x1E,    // ___XXXX_
   0x00     // ________
 },
 {
   0x00,    // ________  H
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x3E,    // __XXXXX_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x00     // ________
 },
 {
   0x00,    // ________  I
   0x1C,    // ___XXX__
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x1C,    // ___XXX__
   0x00     // ________
 },
 {
   0x00,    // ________  J
   0x3E,    // __XXXXX_
   0x02,    // ______X_
   0x02,    // ______X_
   0x02,    // ______X_
   0x22,    // __X___X_
   0x1C,    // ___XXX__
   0x00     // ________
 },
 {
   0x00,    // ________  K
   0x22,    // __X___X_
   0x24,    // __X__X__
   0x38,    // __XXX___
   0x38,    // __XXX___
   0x24,    // __X__X__
   0x22,    // __X___X_
   0x00,    // ________
 },
 {
   0x00,    // ________  L
   0x20,    // __X_____
   0x20,    // __X_____
   0x20,    // __X_____
   0x20,    // __X_____
   0x20,    // __X_____
   0x3E,    // __XXXXX_
   0x00,    // ________
 },
 {
   0x00,    // ________  M
   0x22,    // __X___X_
   0x36,    // __XX_XX_
   0x2A,    // __X_X_X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x00,    // ________
 },
 {
   0x00,    // ________  N
   0x22,    // __X___X_
   0x32,    // __XX__X_
   0x2A,    // __X_X_X_
   0x26,    // __X__XX_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x00,    // ________
 },
 {
   0x00,    // ________  O
   0x1C,    // ___XXX__
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  P
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x3C,    // __XXXX__
   0x20,    // __X_____
   0x20,    // __X_____
   0x20,    // __X_____
   0x00,    // ________
 },
 {
   0x00,    // ________  Q
   0x18,    // ___XX___
   0x24,    // __X__X__
   0x24,    // __X__X__
   0x24,    // __X__X__
   0x2C,    // __X_XX__
   0x1A,    // ___XX_X_
   0x00,    // ________
 },
 {
   0x00,    // ________  R
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x3C,    // __XXXX__
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x00,    // ________
 },
 {
   0x00,    // ________  S
   0x1E,    // ___XXXX_
   0x20,    // __X_____
   0x1C,    // ___XXX__
   0x02,    // ______X_
   0x22,    // __X___X_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  T
   0x3E,    // __XXXXX_
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x00,    // ________
 },
 {
   0x00,    // ________  U
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x1C,    // ___XXX__
   0x00,    // ________
 },
 {
   0x00,    // ________  V
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x14,    // ___X_X__
   0x14,    // ___X_X__
   0x08,    // ____X___
   0x00,    // ________
 },
 {
   0x00,    // ________  W
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x2A,    // __X_X_X_
   0x2A,    // __X_X_X_
   0x14,    // ___X_X__
   0x00,    // ________
 },
 {
   0x00,    // ________ X
   0x22,    // __X___X_
   0x14,    // ___X_X__
   0x08,    // ____X___
   0x08,    // ____X___
   0x14,    // ___X_X__
   0x22,    // __X___X_
   0x00,    // ________
 },
 {
   0x00,    // ________  Y
   0x22,    // __X___X_
   0x22,    // __X___X_
   0x14,    // ___X_X__
   0x08,    // ____X___
   0x08,    // ____X___
   0x08,    // ____X___
   0x00,    // ________
 },
 {
   0x00,    // ________  Z
   0x3E,    // __XXXXX_
   0x04,    // _____X__
   0x08,    // ____X___
   0x10,    // ___X____
   0x20,    // __X_____
   0x3E,    // __XXXXX_
   0x00,    // ________
 },

 {
   0x00,    // ________   ~ (ascii 126)
   0x00,    // ________
   0x10,    // ___X____
   0x2A,    // __X_X_X_
   0x04,    // _____X__
   0x00,    // ________
   0x00,    // ________
   0x00     // ________
 },

Go Up